You left out the part where Microsoft offered to IBM to create an operating system and then bought https://en.wikipedia.org/wiki/86-DOS which was written because Digital Research didn't release CP/M for the 8086 soon enough.
I left out a lot of parts to keep the comment short. Whole books have been written about those events. Accidental Empires has one perspective on the story, although I wouldn't take it as completely accurate.
https://www.cringely.com/2013/02/28/accidental-empires-chapt...