You gotta admit, they do invest a ton of money into security. Mainly to keep consumers from running their own custom software on their devices. I guess that keeps out attackers too. But do keep in mind the user themself is probably part of Apple's threat model.
Absolutely no one vendor can match apple in security, ever.