The app store sold about $50bln worth of stuff in 2019, Apple's 30% cut would therefore mean $15bln in revenue. If they operated the app store at a least a 70% margin (and really, if they didn't, then I'd be rather surprised), that would mean a good $10bln in net profit from the app store, or 17% of their total net profit.
And that's still not accounting for the network effect the app store creates, or the business intelligence.
It might not be the biggest elephant ever, but it's not what I'd call a tiny baby elephant either.
That 30% matters to them a lot.
Increasing prices on top-of-the-line iPhones beg to differ.
Naturally, the 30% take from the app store is bigger, but that's a matter of overall volume, not growth. The app store is a cash cow and will remain so even if its numbers start trending down.
Apple and Google have a model where they make lots MORE money outside the system and if the price of software is ZERO they would be happy.
In Apple's case, even free software sells their phone.
In Google's case, even free software funnels users to their ad platform.
[1] "Smart companies try to commoditize their products’ complements."
1: https://www.joelonsoftware.com/2002/06/12/strategy-letter-v/
(joel's a smart guy, he should write more often)