Apple hosts the app and all the updates and handle the tax. The charge on IAP is how free apps pay their way, otherwise, you have something costing Apple thousands per app per month(at least pre AppStore I was looking at $2000/month at least on hosting and CDN costs). The transaction fees and taxes are just a small portion of what that 30% covers. There seems to be this naive narrative forming that the 30% is a transaction fee akin to Stripe.
That service is still not worth the 15+ billion dollars per year Apple is 'taxing' off developers. There's a middle ground between 3% (a regular payment processor cut) and 30%...
All these billions are customer's money.