The 30% also covers refunds, legal stuff (not stuff IN your app, but regarding the sale of it), taxes, GDPR and much more.
The infrastructure running the app store probably also isn't cheap.
I'm not saying Apple doesn't profit from it, but they're not just pocketing every penny.
As for "quality", they mostly check that your app isn't using unauthorized APIs, or doing other scetchy stuff, like leeching all of your data. They couldn't care less if your app is bad, thats' between you and your potential users.
Does it work ? apparently so. Apple catches around 2 million apps every year that are rejected for those reasons. Android has about the same amount of apps, but there they're caught by Kaspersky (and others) after they're published.
That doesn't mean that malware isn't making its way through the App Store review, the damage will be somewhat limited if it can't use private APIs.
I should add that here in the EU, where we’ve had 3rd party app stores for over a year, nobody uses them. The absolutely biggest one, Epic Games, has attracted about 29 million users across both iOS and Android, out of a population of 450 million.