It’s simply targeted advertising. People are more likely to consider your ad if it’s related to what they are doing. In this case, it’s a music streaming service ad when you are going to play music. The ad wouldn’t be as effective if it was in the iTunes/App Store.
Now, the constant nagging? That’s annoying.