In short, Windows is popular because of a shrewd, unprecedented business move that serendipitously exploited a few faults in human psychology. However, to explain what I mean will take a bit of rambling as I try to explain my reasoning behind that statement.
The reason Windows is so popular has nothing to do with technical merit. It is the most common consumer OS in part because, many years ago (before Windows), Microsoft made a deal with computer makers to package their OS with every PC. Microsoft offered the OEMs licenses for the OS at a discount compared to their retail price, thereby making the PC/OS combo deal a bargain comapred to buying the two items separately. Of course, the only combo deal there was was Microsoft’s OS.
As a computer is useless without an OS, and Microsoft was amongst the first to capitalize on the concept of software being a commodity item, Microsoft had the first OS to be widely distributed. And since people getting new computers wanted to be compatible with the people who already had computers, and different OSs were nowhere near as interoperable as they are now, Microsoft got a lock.
The only real exception to this for years was the Mac, but Apple made some bad decisions like pricing themselves out of the market, being deliberately difficult to work on, and such that about the only people who bought them were anarchists and artists. Businesses went the less expensive route and went mostly PC… with Microsoft.
Linux has a long, interesting history that I won’t get into much here, but the main reason Linux even exists is Linus Torvald’s desire for an OS that lacked the licensing restrictions (and fees) that Microsoft and Apple had on their OSs. They don’t have the marketing clout that Apple and Microsoft do because they aren’t in it for a profit; they just want to make good software.
Of course, Linux isn’t really a company anyways. You have a billionaire, a few small subdivisions of larger corporations, some grey-beards, and others all with slightly different versions of the same POSIX-compliant open-source OS. If an OEM did want to go Linux, would they go Ubuntu? SuSE? Fedora? Mint? Linux isn’t exactly commercially viable as the whole idea of “commercial” is inapplicable to open-source.
Now, most people want to the easy route. The reason Internet Explorer is so widely used is simply because it’s preinstalled. Buying a blank PC, sticking a disc in, telling the computer your name, time zone, and native language… that takes much more effort than just giving the OEM an extra $50–60 (of which $40 goes to Microsoft) to just have a “plug in the magic box and it does sorcery!” route. Hell, the preinstalled OS and “It just works, right out of the box!” was a major selling point for Apple for years; much of the Mac’s early success is precisely because of consumer laziness.
And the misconceptions about Linux’s compatibility, while there is some truth to them, are overblown enough that often even suggesting saving much money for a more stable, secure OS is met with accusations of blasphemy and a flood of provable falsehoods. Oddly, Macs are even less compatible with PCs, yet people are willing… eager… to pay double what they would for a Windows box :/ A little ignorance can breed a lot of fear.
In addition to being a bit intellectually lazy, many people are also a bit xenophobic, especially towards things they don’t understand. One way to mitigate that fear is to march in lock-step with the rest of the herd; those are the majority of your Windows users right there. Sure, you have a few rebels, but most of them think differently, just like everyone else and march in lock-step with a different herd. Then there are the fearless ones who buck the two-party system and wander around solitary or in small packs.
But the vast majority will join whichever herd they can afford (or are willing to pay for) a membership in, and actively oppose any attempt to alter their allegiance, especially if done by trying to break them free from the herd mentality entirely.