iPad and iPhone are not AirPlay receivers, but your iPad and iPhone have broadly the same capabilities for Music playback or streaming on online media services. The App (or Apps) that you are using on one device, can be installed on the other - and therefore can play the same media material.
Licensed media titles, such as music downloaded to your iPhone - or synchronised from a PC/Mac using iTunes - cannot directly transferred or copied between devices. Instead, in your case, you simply download this content again from the source to your iPad where it can be played, or again synchronise your music library from your PC/Mac to the iPad. Music derived from optical media, such as CD, will likely have been “ripped” to your iTunes music library - and can be synchronised to your iPad and iPhone in the same way.
The reason for this intentional limitation, deliberately imposed by Apple, is to protect Copyright. In the case of iPadOS/iOS, Digital Rights Management (DRM) prevents direct copying of copyright material between devices is inhibited. This is intended to prevent the creation of illegal copies of potentially copyright material.
The iTunes Application on your PC/Mac maintains an authorised copy your media - whether this material is loaded from a CD, or downloaded from the Apple iTunes Service - and media derived from this library can be transferred to your iThings.