Well the truth is, IBM allowed Gates to become rich because they foolishly thought that his software wasn't worth much (at the time it wasn't, but Gates saw into the future). IBM thus allowed Gates to buy back the very software he had written for them. IBM never thought that personal computers would take off the way they did. Well, a few years later that whole theory flies out the window (pun intended) and soon enough you have a massive selection of hardware that is running one piece of software: Microsoft software. With that foolish stroke, IBM gave up $250+ billion worth of market power and created the richest man in the world (though not as rich as Rockefeller or Carnegie; their modern day fortunes would be equal to $150 billion or so after we adjust for inflation).
True, but like you said, Gates saw into the future. A stupid deal on IBM's part allowed that vision to come true.