This is "don't anthropomorphize the lawnmower" territory imo. I don't think Apple is actively hostile to 3P developers or tries to lock them in. I think they simply don't care - or lack the institutional capacity to care even if individual developers in the organization want to care.
The Apple developer experience is an abject horror because they believe everyone who is capable of developing high value applications for Apple devices works at Apple, or will work at Apple. 3P devs are a nuisance they tolerate rather than a core value-add for their services and devices. I assume it's less bad within Apple, but I really have no idea.
I'd argue you can see the hostility if you compare shipping to Windows vs shipping to Apple. Microsoft doesn't care if you copy over your MSVC suite into a Wine environment to build your software for their platform. Even SignTool just works. It's not necessarily trivial to do, but that's simply because the MSVC suite is a horrible mess like everything else Microsoft.
Apple explicitly disallows cross compilation in their Terms of Service. Even if you managed to get clang compiling for Mac on another Unix, even if you figure out how to get your app bundles signed outside of OSX, they'll revoke your developer license and invalidate your certs because you're in violation of their ToS. You're right they don't care about third party devs, but the amount of hoops you have to jump through for devops on Mac is almost certainly designed as a gluetrap.
I think Apple is actually one of the few companies that you should anthropomorphize because they have shown a long history of making decisions based on long term strategy rather than short term profits. They also react emotionally sometimes. Best example coming to mind is Steve Jobs on Accessibilty, "I don't care about the bloody ROI." I of course cheered that attitude, and still do for a11y, but that is a very human-like thing to do. Also lets not forget his hatred toward Android and vengeful attempt to kill it. Hence I don't think Apple is a lawnmower. They're more like an elephant with it's objectives and they know they're going to squash a lot of lesser life in the process but "you can't have an omellette without breaking a few eggs."
(From private conversations with people at large tech corporations, my understanding is that that provision of the ToS is inconsistently enforced. Obviously not a good place to be for independent developers, since it partly depends on if you're important enough.)
> I'd argue you can see the hostility if you compare shipping to Windows vs shipping to Apple.
Windows has had 3rd party developers built into its DNA since the beginning though. Even today, Windows goes to great lengths to maintain backwards compatibility. I think this comes from the fact that MS has always been a software first company built around market domination.
The Apple developer experience is an abject horror because they believe everyone who is capable of developing high value applications for Apple devices works at Apple, or will work at Apple. 3P devs are a nuisance they tolerate rather than a core value-add for their services and devices. I assume it's less bad within Apple, but I really have no idea.