Spotify launched on iOS. Apple saw them competing with iTunes and basically stole their idea to compete with them. That, alone, would be okay. But Apple Music is privileged within iOS and Apple's marketing in a way Spotify cannot be.
a) Spotify didn't invent music streaming. There were many services e.g. Pandora that were doing in the years before. It was a pretty obvious idea once devices had faster bandwidth.
b) Apple didn't steal their idea. They acquired Beats who had launched a similar service soon after Spotify.
c) Apple Music isn't privileged. It comes pre-installed but otherwise you can delete the app and use Spotify, Youtube Music etc.
Apple Music is privileged when it comes to Siri. I currently have both a Spotify and Apple Music subscription, and one of the main reasons I prefer Apple Music, aside from shuffle not playing the same 20 songs in a 2000 song playlist, is the great hands free functionality. I can add songs to playlist, play a song next instead of adding it to the end of the queue (which is more of Spotify STILL not having deque support), and I know there are other things I've run into Spotify can't do on Siri, but I'm blanking at the moment.
Oh, I would apply that to any number of things Apple integrated, for example dropbox/icloud drive.
Google does the same thing. Unfortunately, with the near zero marginal cost of software, I do not see any way around vertical integration unless the law started arbitrarily segregating businesses.
Also, Apple Music came out 5 years after Spotify, so it had a pretty healthy lead. But regardless, any non Apple vendor competing with Apple's bundled products is going to face an uphill battle.
Spotify launched on iOS. Apple saw them competing with iTunes and basically stole their idea to compete with them. That, alone, would be okay. But Apple Music is privileged within iOS and Apple's marketing in a way Spotify cannot be.