By running a different OS or firmware on the device allows for a smaller attack surface
People generally buy iPhone for the no-nonsense (or low-nonsense) UX provided by iOS compared to Android - as in, they want to purchase iOS, but obviously it's only compatible and available on certain hardware. An extremely, extremely small majority would install an alternative OS on their phone unless that OS is something like "iOS but with built-in hacks for mobile games", or "iOS but paid app store apps can be sideloaded for free".