Because you would lose your customers. If my operating system limits me from doing things that I can do on other platforms and I want to do them, I will simply not use the system.
Are you realizing Mac is used also by creative people that use Adobe tools, tools for 3D and so on and if everything was sandboxed you couldn't do it anymore.
To reply to sibling: Apple has never catered to PC power users, going back to Jobs arguing against slots in the Apple ][ and getting his way in the first Mac. That a Mac user at all is now considered a power user indicates which way the wind is blowing. Apple's pointed in the right direction.
Given that the PC is an increasingly obsolete platform for most people, I don't think Apple's going to expend a lot of energy changing the status quo one way or another. Its style is to start over from scratch.
Their ecosystem is powered by power users, who do you think is creating apps, games, design, books, videos and so on? If Apple forces to move these users out, they will probably focus on other platforms where they are not so restricted.
All these would be not be usable because they are not sandboxed. Basically I would have to install Windows on my Macbook and I would virtualize Mac OS X so I can use Xcode and I would use Windows for everything else.
It would be suicide for Mac OS X and if you think Apple is so stupid to do it, okay then...
A: Business Insider is rarely a source of truth, at least when it comes to anything Apple. "Click bait" seems to be their sole goal in life.
B: Apple never precluded Google from putting their own Maps app into the store, they simply replaced the preinstalled version with their own when (if memory serves) Google both demanded too much user information and declined to offer vector-based maps
Well, the original question was What if they restrict running compilers? and not What if they remove compilers?.
Restriction might be a requirement of special licence.
This would effectively remove ability to execute arbitrary code from most of the users.
The ones who want to run arbitrary code or develop software will have to pay. If someone complains about this, they would be told to shut up and would be explained how this is actually a benefit for majority of the users.
Anyway, I will stop here.
Edit: I think that Apple is not doing it only because it is not their focus at the moment.
Apple is going actually in opposite way and you can see it with recent changes on iOS. To run apps on iPhone, you don't need to buy a developer licence for 100$ anymore. They support more extensions for apps. On last Apple keynote Microsoft was presenting Microsoft Office running on iPad Pro.
The special licence you are talking about actually exists. You can sign your Mac apps with a certificate and it will not ask a user if you want to open it, but this is not restrictive at all. This is actually a benefit because nobody can modify your app so if they would force this, I wouldn't mind. Most of apps that I use are signed anyway.
I hope it goes better (the future of liberty in computing seems very dim), but I would be not surprised if it goes to the opposite direction accompanied by big ovations.
Apple's core customers are iPhone and iPad customers now. They realized that catering to consumer electronics customers is far more profitable than catering to pc power users, and adjusted everything to fit the profit model that makes them the most money. At times, I wish they had spun off Apple Computer as a separate entity with OS X so that the computer division wouldn't have to sit and play fourth seat to the rest of the business.
Edit: I see from down votes that people disagree with this idea (no problem with that).
Still, why not?
You need a developer licence for iOS that effectively means that you are restricted to run compilers on iOS.
Why not extend it to OSX?