I remember life before the iOS App Store. Mechanisms for delivering software on MacOS usually took a much larger cut than 30%. Heck, when Apple announced 30%, Amazon had to scramble and switch from keeping 70% to matching Apple's 30%. Amazon still keeps 70% if you price your ebook under $3, in fact, while Apple does not.
Your comment implies price-fixing, but history demonstrates competition, and Apple lowered the costs for everyone.
As a comment above[1] highlights, it is more expensive than it might seem to operate the ecosystem.
It always seems like one should be able to reproduce a popular service in a weekend, but the details (and scale) are tricky.
[0] https://www.amazon.com/gp/feature.html?docId=1002999431 [1] https://news.ycombinator.com/item?id=20093819