Freemium apps depend on impulse purchases to work - if you can't get your smurfberries right now to continue the game, they can lose out on that revenue.
Apple as payment processor allows you to click "buy" and have it in seconds.
Using anyone else means you tap Buy, get redirected to a web site, log in somehow or have to manually type in your credit card number then get the transaction done, then return to the game. This is a massive context switch and will certainly take you out. Sure it might work for the first transaction or two but after that your brain might start objecting to having entered your credit card for the 3rd time in an hour to possibly stop doing it.
It's how those games can rack up kids charging thousands of dollars in transactions during a trip to the grocery store. Not so much if they had to keep entering a credit card number.
Sure they may not have to pay Apple 30%, but they can easily find people are stopping after the first transaction because they refuse to go through all that hassle again, then move onto something else. So in the end the losses are much bigger and you made more money giving Apple 30% because they could keep people playing.
When your business model relies on impulse purchases, any little bit of friction easily incurs a huge drop in revenue. It's also why freemium apps never make you create an account or do anything more than get you in the game - the effort of logging in can easily make people skip to something else. Sure they can make you log in later on to save your progress to the cloud, but that's completely optional.
Plus, even non-freemium apps may continue to use Apple for the simple reason that if you buy something permanent, you know you can always restore your purchases. Third party sites don't have that guarantee so if you bought that costume for $10, with Apple you know you can get it back, but not necessarily so on Android or other platforms. Indeed some games and apps note that Android lacks the "Restore purchases" option and you can find threads of people whining about paying $10 for their premium item all over again.
Everything else, like Netflix or Spotify, they weren't giving Apple 30% anyways so this makes no difference at all.
Apple will be just fine. And freemium apps know they can't just switch to a third party webstore or they can lose their whales. They might try, but what's the point of getting 30% more if you're making 50% less?