The underlying UNIX often seeps through the layers and it is simply an objectively worse UNIX than linux. Sure, its user space has plenty of cool features but even those are half-assed and buggy. Like, how come switching desktops is not smooth? Sure, I don’t have an M1, but a goddamn last-intel MBP, it should simply never lag at such a user-facing interaction. Sometimes I feel my T480 is better with gnome on input latency..
Agreed, but iOS is playing on easy mode: it sandboxes everything to a high degree, everything running on it went through some amount of checks to make sure they won't mess up the system, it routinely kills processes so apps must be written to resume properly from a cold start, and it (even today) has relatively limited multitasking. It both doesn't let programs do as much, and encourages or forces developers to employ practices that (I suspect) tend to improve program stability.
I consider most of their "free" add-on software best-in-class or at least best-for-my-use case, with only a couple exceptions (including, yes, Xcode). The software is a whole lot of what keeps me on Mac hardware.