I don’t use Apple and have no stake in this debate, but It’s not necessarily just about breaking out of the sandbox. IOS has “private” APIs available, but those APIs can’t really be private. Apple enforces the privacy by scanning your application when you submit and detect if you use any of them, and if you do they get rejected.
These APIs can be used for fingerprinting, detecting what apps you have, etc…
It also isn’t just about zero days too. One of the things Apple forbids is dynamic/JIT code running (which is why you can’t have a real 3rd party web browser). Without that restriction once an exploit is known those apps can be instantly auto updated to exploit it on a whim (or use fingerprinting to selectively target who it exploits).
Not saying these are compelling reasons to keep sideloading banned, but it is consistent with Apple’s practices and views for why they view that the walled garden enhances security.