Apple routinely goes out of their way to reinforce the sentiment that Apple hates developers. The only reason developers still support the Apple ecosystem is because there's a lot of money to be made within the US (where Apple devices carry non-trivial market share).
If Apple banned 3rd party App Stores, the money would just become more concentrated. Therefore, all the developers will go to the Apple App Store...
No loss from Apple's perspective - in fact, it would be a tremendous gain.
If Apple ever stopped letting you install arbitrary CLI tools, they'd lose every software company issuing their developers Macs. Yeah, they'd keep the solos actually targeting Mac itself as a platform, but that is not going to be anywhere near the plurality of people using it.
iOS is the way it is because, for better or worse, Apple sees it as an appliance, not a general purpose computer. That has never been true for their PCs. It isn't true for any PCs at all. Microsoft will never do this with Windows, either. It doesn't matter how little you think of them. You people on Hacker News are way too cynical about this stuff to be realistic. The business cases alone make no sense. Plenty of companies need to be able to install their own software that they write for internal use only. They're not going to put that in a public app store or through any kind of external review process. Those customers might even still want central control, but through their own app store, not Microsoft's or Apple's. That's why SCCM and JAMF exist. They not only allow third-party app stores, but you can get the third party app store from the official app store!
If that's what it actually was, they would be using WSL. Or their companies would have them using WSL (because supporting Mac endpoints is a pain in a Windows-first shop, which is to say most shops). The fact that so many developers still use Macs even years after WSL came out indicates it has to be something other than the unix experience.
If Apple makes it so that it's not native, I am pretty sure there will be significant number switching OSes.
And then what? Oh no, they lost 0.1% of their market share!
They do not care about developers. Understand that.
No, they may leave the Apple ecosystem as main development platform and only use a company Macbook on the side to port their app to the appstore.
As long as Linux exists I don't really need Mac OS, I need a laptop & OS which lets me install & build arbitrary software.