That's not it. Most youtube downloaders are not developed in the open and Youtube still breaks them every other week by changing on purpose the way they operate. And, unlike highly obfuscated instructions, studying the network queries used by a simple app does not require expensive reverse engineering efforts from Spotify engineers; essentially, it's the same as developing in the open.
The only case i can think where obfuscation might help would be if the actual Spotify API consumers were servers by the app developers (or some form of obfuscation via residential proxies) and the app developed an entirely different API to/from its servers. But then, you're back to the developers and hosts can receive legal threats, etc...
You propose the open-source community operates behind closed doors like the very software they aim to replace?
I’d argue Spotify has so little to gain by being hostile, that perhaps the lawyers are more expensive than just ignoring these pet projects (which would never gain mass adoption).
The lawyers are more expensive than happy customers staying customers because they can enjoy the client they prefer, that's for sure.