It is a nasty dark pattern but I think in the case of iOS upgrades you can somewhat justify it - it’s important that users upgrade to avoid security issues etc. Of course really, iOS upgrades should be so pain-free that no one would ever want to say no, but that’s a different story!
iOS devices in general. Spend two months away from one and you'll have about 3-5 modals pop up at different times while you just start to use the device. Awhile ago I was using an old iPad, dismissed a several modals and started reading. One modal that I dismissed previously came not more than two minutes later again, completely interrupting me. Stopped using it after that, wanted to throw it against the wall.
I suspect that their motivation to push users to upgrade has far more to do with their planned obsolescence than anything to do with keeping users secure.