I download music from Amazon or other online stores regularly on my iPhone. I can't play that music file from my iTunes music library without first transferring it to my desktop PC with iTunes and then to my iTunes music library and syncing it with my phone, because apps are sandboxed, and iTunes music library on iOS is also sandboxed. But I can play the music I've downloaded from Amazon or where ever from the app I downloaded it from, as long as that 3rd party app supports it, such as iCab web browser.
Originally Posted by pttptppt
Remember, apps are sandboxed, and that applies to all files that apps download, not just music files. Safari does not have in-app-storage for downloading files, though if you have an app like VLC, Safari will prompt you to open the audio file from within VLC and will save the file in VLC's in-app-storage.
As a musician, there are ways to share music files across apps, using audio sharing, which has been around since iOS 6, I believe. Even GarageBand and iTunes support it, but app developers have to support the feature, not all do.