The main reason is just a single company - Apple. They have been hell bent on nerfing Safari so that they can continue their rent seeking behavior on App Store.
If Spotify has a functional mobile website, they cant take 30% cut from their app. The way Apple does is 2 fold. 1) deliberating not investing $$ into Safari 2) claiming that you'll get malware from internet.
Both are hypocritical.
And Spotify hasn’t had in app purchasing of subscriptions on iOS for over a decade. Apple has never once said you would get malware by using Safari.
Who do you think is stopping from that happening?
Apple makes no money from the Spotify app being on the iPhone and hadn’t for over a decade.
It's not a defensive argument about "but he did it too"!
That's not how you get to a better solution to the problem at hand.
On iOS there is no effective way to install sideloaded apps, therefore this rent seeking behavior is even more hostile to the user.
Music was played by the iTunes process on mobile until 2016, and only a single audio stream at a time. How dare you wanted a fade in/out with less than 3 seconds latency!
And even then Apple was reluctant to implement a correct Promise based Audio API in WebKit, which in turn was incompatible with all other Web Browsers (up until today, btw) and also had very different audio formats supported that were only compatible with iOS due to proprietary patents.
Saying WebKit played music in 2007 is literally a worse experience than a Flash web player doing that.
The question was why did Spotify have to use an app instead of using the web.
But then again, are you really saying that Android users don’t use the app?
But … I don’t?
I download and install Spotify.app on my computer (at least my gf does on hers, I use Apple Music). Maybe I am the weird one? No I am not, I skimmed the Spotify subreddit and most use the app on PC/Mac: It has keyboard shortcuts, people find it nicer being its own program instead some browser tab, it is more lightweight, it provides offline play and crossfading and has (freemium and paid) higher bitrate than web. It is you who are missing out.