Microsoft is in the software business. Apple is in the hardware business. Apple computers are solid and run better because they make all their own parts. Windows(MS) running machines are usually a jumble of different parts made by company's. Not always designed to run long term at their highest level of performance. Though have made great advancements in recent years. Apples good programs are very small in number. Most of the world relies on Microsoft software. Rumor that Apple may go out of the computer making business in a few years and focus more on phones, etc. Steve Jobs may not e around much longer, so who knows.
Some Geek hate Bill Gates, so spend thousand of hours developing virus, malware, trojan, etc programs to destroy Windows OS. Other Geeks just like the challenge of seeing if they can get any foreign Windows killer through. No so much attention is paid to Apple OS/machines. If Geeks really wanted to focus on Apple big time, then Apple would have just as much trouble with viruses, etc than Windows does.
Might add that Linux is probably one of the best all around developing OS out here, but very few programs compared to Apple or Windows. Takes a little learning to get use to Linux, not for most people.