When Microsoft went public in March of 1986, co-founders Bill Gates and Paul Allen, two friends from high school who bonded over their mutual love of computer science, became multi-millionaires.

Although Allen had left the company years earlier amidst health concerns, Gates, then 30, remained CEO and rose to prominence as one of the richest people in the U.S. The shares he sold made him $1.6 million, and the 45 percent stake he retained gained a market value of $350 million.

The young CEO celebrated his newfound wealth by making a very sensible decision: He paid off his $150,000 mortgage, he told Fortune in 1986.

That was a smart move, financial experts Kevin O'Leary and Suze Orman would say: Both encourage you to eliminate any debt, including a mortgage, as quickly as possible. "There's never an incentive to stay in debt," O'Leary tells CNBC Make It. "Life is unpredictable. What happens if you're laid off or incur unexpected expenses elsewhere? Your once-manageable mortgage is suddenly going to seem not-so-manageable."

And although Gates ended up wildly successful, nothing was guaranteed at the time.

Paying off his mortgage was also more practical than some of Gates's earlier decisions. In 1979, when he first started making big money off Microsoft, Gates bought a luxury car: A Porsche 911 supercar.

"I bought one thing that was a tiny bit of a splurge," Gates told David Rubenstein during a 2016 Bloomberg interview. "It was used, but it was an incredible car."