Yes, CP/M-86 could have played to role of MSDOS but people really needed to buy a box with a floppy disk to install from or a preinstalled OS on their new PC. MS did that right.
All that is not very relevant. Had Microsoft never existed, it'd have been an ecosystem too different to make any valid prediction. We'll have to eventually restore the universe and run a different path to see.
Just like it happens with any standard, we ended up with lots of #ifdef, because many APIs might had the same name, but not the same semantics.
And like in UNIX like OSes, all the cool goodies weren't in the POSIX APIs anyway.
It is quite sad that despite some of the cool GUIs like on NeXT and Sun OpenWindows, the best that they could settle on as a standard was Motif.
We could have gone the slightly-less-compatible route with CP/M-86. Network effects would make the industry gravitate towards a standard platform, but not necessarily a company.
I remember tons of GUI software running on proprietary Unixes on vastly different architectures, all written aiming POSIX compatibility and an X graphics environment.