A few months ago I heard about the concept "return on luck". It seems to me that Apple had the highest return on the luck they had of any of their contemporaries, with the possible exception of Microsoft.
"In 1980, she discussed her son's company with John Opel, a fellow committee member, and the chairman of International Business Machines Corporation (IBM). Opel, by some accounts, mentioned Mrs. Gates to other IBM executives. A few weeks later, IBM took a chance by hiring Microsoft, then a small software firm, to develop an operating system for its first personal computer."
That helps explain Gates talking to IBM. It doesn’t explain IBM’s taking the contract, or their massive blunder in allowing Gates’ non-exclusivity clause on the OS.
Lots of companies contracted with IBM without IBM signing off their whole business to them.
Bill Gates clearly was very fortunate in his life, but it’s a mistake to chalk the IBM blunder up to 100% luck.
And his parents were lawyers, so he was somewhat familiar with the fact that powerful enough people could use the courts to prevent ordinary folks from "illegally" copying software media (tapes, floppies, punch cards, etc.).