So your opinion is strange. For example for a thing as simple as doing a threaded function win32 was a pain is the ass. Compared to this, methods provided by POSIX or Boost where a lot better for me. Both of them were multi-platform. There are no lack of documentation, and the documentation is kept up-to-date and the best about it still that everyone can improve (it's free, as in freedom!) or can ask some help, for example, on IRC?
That's not actually what I was talking about - documentation for a single API can be as good as it wants to be, but it won't be of much use if all other APIs aren't written in a similar manner, with similar goals. That's the problem. I'm not saying that there isn't a widespread non-Microsoft API that would have a better documentation as a widespread Microsoft API, that would be silly.
What I am saying is that when you learn to code in Windows environment, you can count on everything being unified and familiar, without any hoops for you to jump trough, and that, generally, MS technologies will be better documented and will get better support. You can't really argue with that, it's a given thanks to the size of userbase.
And that brings us back to this point:
But they give up about this market share just because the original technology choice was bad. If they did a better choice at the origin, there will have no question : it'll just works.
One more time, if it don't offer 100% of what you're looking for, you still free to participate in those project and improve them the way you think it's good. It's what we call a virtuous circle and it's something really helpful and great as everyone is winner with such solutions :)
I'll give you an example. When I was learning gaming development under Linux, I found the IDE I have been using terribly inadequate to what I have gotten used to from Visual Studio, so I went and looked for a different one. All was good, the functionality of the new IDE was far better, however - I could not, for the life of me, link libraries. Turns out that documentation I have found was referring to an OLD version of the IDE, and in the new one, I have to write a compiler script to do the linking.
All right, I have learned how to do that as if I were to ever develop a videogame on a more professional level, I want it to be multi-platform, and then I finally got to coding itself. Later down the line, I have hit several issues similar to that - with the library I was using, with the environment, just couple of things. But, in the end, what I would have done in like 2 days in Windows took me a week in Linux, due to constant small or big issues I kept ramming my head into. Now I'm fine with that, I enjoy solving problem - a lot of other developers just want to make a game tho. And let's not forget software like game maker and similar which is bound to Windows - some people are just not about to get into programming any time soon, and you wouldn't believe how many popular games are produced that way. Those developers don't really have much of a choice.
Right, and now we're finally getting to the last point, 'if you don't like it, you can write it!' - well, yes, of course you can. Which involves navigating in a completely alien code at the time you're getting into it, figuring out what exactly do you actually want to change, and then changing it. Sure, you learn a lot this way - but it's extremely time-consuming and completely non-viable approach when you're on a deadline / don't have all that much time.