In this case they're shooting themselves in the foot. By requiring potential developers to own a Mac, they sharply limit their developer audience. Thus, fewer apps being made for their platform, thus fewer apps to drive using the platform, thus fewer sales of their precious hardware.
They showed time and again that they don't want a too-wide developer audience. They already have too many apps, and see the choice fatigue in users. They want big companies professionally produce polished stuff that commands, say, $14.99 in app store, of which $5 is Apple's share. They want stuff like Beatmaker or ProCreate.
Small fry need not apply; if they insist, they should at least clear the threshold of owning a Mac and paying $100/year for the App Store license.
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.
They've been at it for over 40 years and grew to the most valuable company in the world. In many computer fields they still are THE platform (anything design for example) so clearly the software they do have is plenty.
Can you elaborate what you mean by shooting themselves in the foot?
Do you see them as a centipede who sacrificed one foot in exchange for all the riches in the world?
Or do you mean that if they were more open to developers they'd somehow be even bigger? What's bigger than a trillion dollar company? Would they be intergalactic?
Because they haven't achieved any serious success with the Mac. If they didn't have their portable device line they would be a bit player in the tech industry.
Not really. I'm a long time Apple user. Started using macOS with the version 9 (but my first personal laptop ran OS X).
I don't consider them successful in computing. In fact my first job was at an Apple Service Provider and it was already hard to run everything useful on Macs. Now I wonder how much technology is actually actually running on Macs. Their computers are becoming glorified clients for other companies technologies.
They make make a ton of money selling a lot of small devices that are more about fashion / social statut than technology relevance nowadays.
As it is there isn't a whole lot of good reasons to start using a mac instead of anything else.
I don't think they are currently successful in the computer business. Them making shiton of money on overpriced mobile fashion doesn't really change that.