It could also be there is only enough profit for one, so the game theory equilibrium is zero. So Spotify could be the only player large enough for Sony to profitably encourage. Although that theory doesn’t account for them not giving the option of free music players written by hobbyists who don’t care about profit or labels but only serve indy content
PlayStation Music (or actually "Music unlimited" as it was called) was the only music application able/allowed to run in background while a game was running. Other (hobbyist) music players are not allowed, likely because it would make the available resources to a game less predictable, so harder to optimizer for the console...
As many others, Sony found later that it's not worth it to operate a own streaming service, and probably made a deal with Spotify where Sony provided the initial application, Spotify provided the service and potentially pays some additional revenue share to Sony.
It's a story from a moment in time where every distributor/company thought they could do a better/more profitable music streaming service than Spotify...
Apple Music and local playback supports background play while a game is running. I doubt it's any of this "allowed to" nonsense and simply those other apps just didn't add support for the PlayStation.