The majority of the cost is simply for being able to
participate in their market of 1B+ credit cards which lets ISV's frictionlessly sell Apps direct to consumers globally, it's not for the direct tangible benefits the App Store otherwise they wouldn't outlaw competing services that would handle the same services for a reduced royalty %.
Although what's not being discussed are negative consequences of allowing multiple App stores vs Apple's single unified curated UX. The UX for searching, purchasing, managing payments/subscriptions would be more fragmented & confusing. Being able to bypass curation by installing Apps from another App store which could install malware, scams, privacy violating & other undesirable Apps would hurt Apple's brand as a simple, secure & safe platform parents are confident in using themselves & giving to their kids (which for example allows us to manage/disable IAP's).
At 2M+ Apps your App isn't going to magically appear in front of all consumer devices, you still have to do the majority of the marketing yourself, unless you're lucky enough to be listed in editor picks or some curated list, but you're not paying for exposure or discoverability as the % royalty is the same regardless.
With that said 30% seems fair & standard across most platforms [1]. I don't really understand why 30% is unfair for iOS which has created the most lucrative & accessible market for ISV's. It's simply a cost of participating in a market. Just like you don't get free shelf life in shops (virtual or physical) if you make a product, free access to Game consoles if you make a game, free top search placement if you make a website, etc.
[1] https://www.ign.com/articles/2019/10/07/report-steams-30-cut...