So Microsoft was able to buy a DOS and then cut their non-exclusive deal with IBM that enabled MS to sell to other manufacturers as well.
IBM went outside for the OS because they believed the money was in the hardware.