The reason for this 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, this measure being intended to prevent the creation of illegal copies of potentially copyright material.
The iTunes Music Library 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. In Apple’s architecture, the computer handles the DRM aspects of managing your Music Library.
None of this prevents purchase and download (actually Licensing) of Music titles purchased directly from Apple’s Music App.