MSDN is still pretty damned expensive... That is a significant profit center. They've also had a lot of free and/or open tools over the years.
I learned C# with a big not MS book, and the command line compiler alone. In late 2001-2002, I was unemployed and it was nearly impossible to find work as a developer. I spent my free time learning the ins and outs of C#, and by mid 2002 was working FT again. By comparison, I also tried to get into Java, and it was painful. Not the Java language, but the tools. Getting a simple hello world in Java wasn't fun at all, getting anything more complex outright painful.
I didn't pay MS a single dime. Through the early 2000's I did a lot of ASP.Net development. Both in, and out of MS's sphere. I used Castle Monrail on Mono in Suse Linux. I also used .Net in Windows. I built a standalone kiosk system on Suse that used an embedded browser for the UI via Mono and a Mono backend.
I also worked in MS shops, where the Windows and MSDN licenses were paid by the company. I'm generally skeptical of MS. I was hugely skeptical of Silverlight. I don't like that MS doesn't have an official client for MS Team in Linux (despite MS basically having the best cross platform Electron tools) and generally falling short on Linux all around these days.
MS tends to make their money when developers using their tools makes money. Historically off of Windows licenses, today probably as much or more so from Azure. Not counting Windows and o365.
And while I would prefer to be on a Linux desktop/laptop at work, I do appreciate the work they've done with Docker and the WSL teams to make development for non-MS better overall.
As to installers, there's InstallShield, NSIS, Inno Setup, Wix and a lot of others that have come up over the years. I think there was a light version of Install Shield with VSTS. I don't think MS has been nearly as bad on developers as you seem to feel.
At least MS doesn't force you to turn over 30% of your income to them like Apple does.