First and foremost Linux was free, no money, no licenses, no procurement procedures, download and install.
Windows insisted to have a GUI even on servers and you had to remote desktop to them and click click click. That was how most of the world was using those NT 3.51 boxes.
It soon became PHP vs ASP and Java run on both OSes equally well.
There were still many Unix developers around and they picked up Linux at least as a deployment target.
Web servers were developed for Unix first. Porting to Linux was trivial. Porting to Windows not so. We had to wait for IIS.