A couple of posts have mentioned the lack of competition (aside from Apple). This largely comes down to what economists call "barriers to entry." It's pretty easy to create a bagel shop, since it doesn't require a huge capital outlay. So, this business has low barriers to entry; there will be lots and lots of small bagel shops as a result. Creating an O/S has never been easy, let alone one with the graphical display and wide array of features in a "modern" O/S like Windows 7 (which I think is a fantastic OS overall). There are millions and millions of lines of code in a modern version of Windows, or Max OSX, or Linux.
Then, there is the unavoidable fact that an OS requires maintenance. Microsoft doesn't have to release a pack of updates on the second Tuesday of each month because they have crappy programmers -- far from it! Any piece of software of any complexity is effectively impossible to write without bugs simply because of the amount of code involved. Hell, even relatively simple programs usually don't work the first time you try to compile and run them.
So it takes a big company to create a highly functional O/S. In a business which requires such enormous capital outlay, it is inevitable that there will be a small number of successful competitors. Considering the part Linux plays in embedded devices, servers and supercomputers, and phones/tablets (Android is a version of Linux if you didn't know this) there are effectively three major players in O/S'es. Similarly, there are few major CPU makers, with Intel occupying a Microsoft-esque position in desktops but not quite with the same market share, and AMD eating the scraps. Phones usually use designs based on ARM cores (a company in the UK which licenses power-efficient CPU designs for low power situations). There are more car makers than either of these examples, but it's still a relatively small number that each make many thousands of cars a year which make up the world's car market.
It's not necessary that Microsoft specifically have the position it has, but it is necessary that there be a couple of large companies controlling most of the O/S market. Is Microsoft an "evil?" In the 1990's you would have a better argument than now, given the anti-competitive tactics they were eventually brought to court for (in the Netscape case). Since then, they've been consistent in obeying the law. Are they an evil for creating a "flawed" Windows? As I explained above, bugs are inevitable. The malware problem is largely a result of the fact they occupy such a large market share and have for a long time; Windows Vista and 7 are more securely built though there are a lot of less secure XP boxes still around. Actually, much modern malware is generally spread through social engineering rather than computer engineering - they don't necessarily directly attack the software in order to get into the system, but the user. Also, relatively few malware programs are designed to infect Windows directly but attack popular third party software like the browser (albeit IE is another MS product, though with a less dominant share in the modern browser market) or Adobe reader as a means to infect the system. In an open ecosystem like that of Windows, Microsoft has a limited ability to police developers who write for its platform. 'Sandboxing' techniques for isolating programs to a greater degree from the base system seem to be gaining in popularity but aren't yet ubiquitous.
Microsoft does their best to combat the problem, and it's quite a healthy thing that they update so regularly too. Apple's update pattern (yes, Mac has lots of bugs too, inevitably) actually could do well to learn from Microsoft. Putting out huge update packs every few months lets whatever bugs that are addressed in the update pack go unpatched on average quite a bit longer than similar bugs in Windows. It's also a positive that Microsoft nowadays is quite transparent about most things, in contrast with Apple which likes to use mystery to built its 'aura' -- and also likes to ignore the fact that it is not nearly as invulnerable to attack as they'd like you to think. Apple also isn't nearly so transparent about what exactly is in each update pack as Microsoft.
Well, that was a long post but it was a complex topic to attack!
"If you can't take a little bloody nose, maybe you ought to go back home and crawl under your bed. It's not safe out here. It's wonderous, with treasures to satiate desires both subtle and gross... but it's not for the timid." Q, Q Who