On iOS, certain API restrictions are enforced by the app review process.
Not to mention some behavioral restrictions are purely enforced by the threat of being banned from the app store.
For example, apps could[1] spam you 10x a day with 3rd party advertising push notifications, but that is banned by app store policy, not by any technical limitation of the platform.
[1] For awhile this was a serious problem on Android until Google clamped down on it, again, using store policy not technical restrictions.
Think pre-SP2 Windows XP. Think the JRE updater installing the Ask Jeeves toolbar. (Or Chrome, that was slimy....)
Drive by app installs initiated from Safari on iOS would be Bonzai Buddy all over again.
Right now if a handful of misbehaving apps makes it past the app store review process, it is in the news.
What happens if that review store process is no longer there? How many alternative keyboards will be going around stealing credentials? How many apps spamming ads 24/7?
Notarization for apps on macOS already checks for private API usage[1] even if the apps aren't distributed on the Mac App Store.
[1] https://www.waynedixon.com/2019/05/16/new-notarization-requi...
But I agree with the other posters: literally making it impossible for me to willingly do something with my own device is not a feature.
There are other ways to help prevent payment issues or privacy concerns - one of which is just sticking to the App Store (if it really is that valuable then won't the market decide?) - the other of which is requiring hoops to jump through like Google does with third-party applications on Android. Hell - look at Gatekeeper on macOS.