I don't know why but Microsoft programmers seem to make bizarre code choices. I worked with a lot of principal developers in my life but the ones from Microsoft wrote the most convoluted code I have ever seen. Even though it's anecdotal I wonder what is going on in the culture that Microsoft keeps producing these shabby programs all over the place.
I think I read on another hacker news post that some windows API where intentionally made convoluted/hard to work with AND poorly documented in the official documentation. So that the API author's could go off and write a "win32 explained" book, and become fabulously wealthy.
Casey has also spoken out about the horrible state of affairs in Microsoft in the past https://news.ycombinator.com/item?id=27728177 so I'm sure it's not a one off phenomena.