If it's so terrible why did microsoft develop the windows subsystem for linux? Shouldn't they instead try to avoid the "pile of legacy" as much as possible?
Because they saw a market opening with UNIX devs no longer happy with the hardware selection for using macOS as a pretty UNIX.
Also their goal is not to run 100% of POSIX or Linux specific software, rather achieve a good enough compatibility to run majority of well known projects and utilities.
1. MS is all about "piles of legacy." That is not counter to their philosophy at all.
2. MS apparently sees some long-term advantage to having a Linux compatibility layer. (By "advantage," I mean of course some way to make more money.)
Neither of these things has any bearing on the quality of Linux, or lack thereof.
Well they didn't replace their NT kernel with WSL? So it's a bit of apples-to-oranges comparison. WSL is there to provide access to the existing, vast library of linux software that might not have been treated with win32 ports?
WSL is an attempt at getting developers to use Windows rather than OS X or Linux. That's a very different situation than coming up with the fundamentals for a new operating system.
Because developers who write software that is deployed to non-Microsoft cloud providers are writing code that runs on Linux, and WSL makes that a lot easier to do on Windows.