Can you explain why you're surprised? Are you surprised that companies have long worked in/with non-democratic countries as well, where some or all of their operations could be shut down or taken at the whim of someone in power? It all ultimately just comes down to another risk/benefit analysis, simple as that. Every player evaluates how likely they are to face problems with their given business model, how potentially valuable the market in question is, and what levers they have to exert, then tries to price in a premium to reflect that. If they make more money in the end then it costs it's a win, and the iOS platform represents a very large set of users with a relatively uniform platform (good for costs) and greater-then-proportional economic power (iOS users aren't a random sample of the population, by virtue of the cost of entry they're likely to have higher amounts of disposable income). Of course businesses will see profit potential there, even with Apple's many, many issues.

>with no recourse

Isn't quite correct either. As in other closed markets, there are more levers then just official rules to pull on, particularly for large organizations with significant resources and followings. Apple as a business has their own cost/benefit and risk/reward assessments to make too. The first, as Spotify is doing right here (and as other app developers under iOS have done before), is to simply try to make it a significant public relations issue. Apple is not an actual country, and their stickiness is in fact limited. People can leave, or perhaps of more concern to Apple given their growth goals, people can simply never sign up in the first place (earning a first customer is always more difficult then keeping an existing one, and most of the low hanging fruit has long since been picked). Significant backlash can and has caused policy changes or at least individualized reversals in the past. This is more feasible precisely because of the arbitrary nature of Apple's decisions: if they wanted to create an individualized exception for Spotify nothing stops them.

Second, Spotify is a big enough player that they can flat out threaten to degrade service or leave if the cost becomes too much, which may be an influencer for future purchasers. They can multiply this if they can get other similar services to do the same, work to fight Apple Music (via exclusivity deals etc), and so on. That leaves Apple to do math on whether the (frankly minimal) revenue stream they get from their 30|15 cut on subscription revenue is worth even a minor blemish on their hardware sales and the network effects they get from a bigger platform in general.

Third, the spectre of government regulators absolutely lurks in the background for something like this. Not all jurisdictions have the same rules or enthusiasm when it comes to monopoly investigations, but Apple is global and can't afford to fully retreat from any major market unless it represents an existential threat to them. Even if they'd ultimately be victorious, the mere threat of the EU for example going after them is something they have to take seriously. Apple historically has seen software & services primarily through the lens of driving hardware/platforms rather then a core revenue source in their own right, which means the upside for them vs a nasty judgement are much more limited.

I personally feel like exclusively closed platforms like iOS should be flat-out illegal, that users should have the ability to opt-in to a sideloading key (with risks therein accounted for of course), but that's beside the point here. There may always be markets where major players have the ability in principle to stomp on players beneath them, but in practice other players will aim for them anyway.