The real world runs on Linux (from servers, data centers, microcontrollers, ...), business runs on Microsoft/Office, and creative makers (from designers to OSS creators) do it on a Mac.
Of course not 100% true but wherever I look its like >50% true at least.
Not to mention being the most valuable company in the world, sitting on _not_ the majority of users _but_ the majority of user revenue/wallet sizes, and having more cash to spend at hand than nearly every other company in the world has in total revenue, to the point of surpassing small/medium countries' GDP.
So far, "shooting themselves in the foot" I would not 100% agree with. And depending who you're asking, the Mac is the #1 platform, and is even growing since M1 chip releases.