I could shell out thousands a year for all the MS compilers, MSDN, etc. or use free languages like PHP and get PHP.NET for free
It's been nearly a decade since I essentially stopped developing code for Win related technologies. Since you touched the development part with MS, the main issue wasn't the annual subscription fees as far I recall, but the technical support. So I had a problem developing a driver or a DLL or some questions for the API there was very little info available. Unless you could afford premium support it was extremely hard to develop stuff running your own business. In most cases I had to "workaround" and redevelop code because of it.
Now I wasn't expecting to have a dedicated engineer answering my questions but following some basic common sense I would expect MS to have at least dedicated forums open to public for developers or other enthusiasts who wanted to exchange opinions and experience. Given the company size and exposure there was very little around.
Not sure how things evolved since then, the last I remember when I had some people asking for IIS support over some open source PHP code I developed, I came here after searching, opened an account and asked that question simply because I didn't have the means to test it locally. The short answer was - go and install some package that will emulate Apache on IIS.
And because of the lack of documentation, discussions and forums etc, whenever I had to do something with the Win API, would take me much longer than with open source like Linux based O/S, PHP etc. So I switched development towards open source.
The way I see MS loses ground because they do not attract easily independent developers as much as open source software does.