My take:
Apple made marketing mistakes in the early days. They make the hardware and the operating system, while Microsoft just makes software and has deals in place with manufacturers who make the boxes to make things that will run windows. That gave them an edge in getting into the business market, since the boxes were commodities and could be made cheaply. There's a saying that was prevalent a few years back - "Nobody ever got fired for buying IBM products" - they were a known entity; they weren't going bankrupt anytime soon, which is not something you could necessarily say about almost anybody else. And they made machines that ran DOS and then windows. Not mac. So business people could buy IBM PCs without getting into real trouble, even if they weren't the best product. Nobody knew that mich since it was a relatively new product.
Apple eventually let others make hardware, but ran into quality and compatibility problems, similar to some problems that plague PCs. This hurt them more, and MS grabbed more of the market. Apple eventually stopped licensing, and went back to making all of their stuff.
But once MS had a large part of the business market, they got most of it because of compatibility issues. Years ago, especially, computers didn't play nicely with each other. People started buying home computers, and got what they used at work. More market share for Windows.
So now, if you're writing a game (or really any) program, you tend to do it for the large fraction of Windows users, rather than the small fraction of Mac users. Maybe you port it to the Mac afterwards. But there aren't that many programs that run only on a Mac.
The best product doesn't always win. Quality-wise beta is better than VHS, but VHS won the videotape market. because Sony was too protective of beta and it didnt get widely adopted.