People forget that MS used to have it's own Unix in the 80s: Xenix. I ported a large DEC PDP Fortran codebase to run on Xenix back then - it was far too big to fit in the 640K DOS limit. Writing the Xenix device driver for the 68000 powered graphics card in the PC was fun.
Microsoft created Xenix because they knew DOS would have a limited future, and in particular they knew there was a lot of value in running enterprise software on microcomputers. They also knew costs would go down and performance would go up over time and that running minicomputer-grade stuff on micros would become more and more feasible as time goes on.
They made Xenix for a number of microcomputer platforms, typically partnering with the hardware manufacturers (as is the case with Tandy). For the PC, they chose to partner with SCO instead for some reason.
Xenix was Microsoft's next-generation operating system, intended to be a platform for the few high-end customers who wanted to run enterprise software on PC, with plans to push it across the mid-range and even the low end as PCs get faster and fast hardware gets cheaper.
And then, it all changed when AT&T got broken up. Suddenly, AT&T was allowed to commercialize their software, including Unix. And AT&T was very, very much interested in doing this. The whole thing culminated in System V Release 4, but that took a few years for AT&T to put it together. In the meantime, Microsoft thought they'd never be able to compete in the Unix market against the creators of Unix, so they panicked, sold Xenix to SCO, and began looking for a partner for their _new_ next-generation operating system.
So Microsoft hooked up with IBM and created OS/2 as their successor to Xenix. Eventually, however, Microsoft fell out with IBM...
After falling out with IBM, Microsoft decided to do it entirely by themselves, so they poached a bunch of ex-VMS guys from DEC and created Windows NT. After a few years serving as an enterprise OS, Microsoft began trickling NT down to the consumer market, eventually replacing DOS-based Windows entirely with the launch of Windows XP in 2001.
Just imagine the alternate world where Microsoft didn't get spooked by AT&T commercializing Unix and instead focused on Xenix, trickled it down to the consumer market, and ultimately replaced DOS-based Windows with a Windows-style GUI built on top of Xenix.