hasn't happened on android with sideloaded apps. Stop fearmongering.
Lets say it like that, and I know I am simplifying quite a bit:
Apple checks security at "compile time", during the App Store checks.
Android checks security only (or mostly?) during "run time".
"Compile time" can give good guarantees because the "compile time" can quite long. Then, during program execution, there need to be less run time checks (and a program can be much faster, by the way).
What do you think happens when allowing sideloading on Apple iOS devices? Suppose there are much less run time checks available because compile time checks are expected?