He bought DOS from some guy that ripped off (reverse engineered) CPM. But give Bill credit he is a good salesman and he convinced IBM to use DOS as the OS on their new PC. IBM considered the PC a toy and did not think anything would come of it. But at the time gov was using a variety of small office computers (all of them as good or better than the IBM PC). But none of the office computers could communicate or share data with the others, so to end this mess Reagan declared that gov should adopt the IBM PC as the standard office computer. In an instant Bill Gates became a billionaire. Gates won the lottery. Other than being a good salesman Gates brings nothing to the table in terms of talent.
You forgot to mention that he helped bring the fly-then-fix mentality to code writing. Pushing money from writing good, tight code into marketing and thereby outsell companies trying to do things right.
Now, it was probably inevitable that someone would get the idea to push things out the door ASAP and then sell updates, but someone just happened to be Gates and company.
Did you ever see the video where the guy says that Gates made “control-alt-delete” famous?