Being the boss of a major corporation isn't easy. It's a hugely challenging job which, at least in theory, is why such leaders command astronomically high salaries. A very few people have the needed skills to take on that challenge and lead their companies to success. A lot of people don't have those skills, but somehow manage to land the top job anyway.

The personal finance site GOBankingRates recently came out with a fascinating list of 28 CEOs who either saved or sank major companies. Some of these were successful executives who came into a struggling company and failed in their attempts to turn it around. For example, Marissa Mayer was supposed to revive Yahoo's falling revenues but wound up selling it to Verizon after things got worse instead of better.

But it takes particular ineptitude to start with a perfectly successful company and drive it toward failure. That's especially true when the reason for the decline has nothing to do with the company's product or services, and everything to do with bad behavior by its executives. Here are three CEOs who almost killed the companies they led by--unintentionally or intentionally--creating a toxic culture and damaging their own brands.

There's an important lesson here for every leader: In the long run, your company's reputation is its single biggest asset. If employees' behavior (or yours) are a threat to that asset, you had better do something about it before it's too late. Or you could simply ask yourself what these three gentlemen would do, and then do the opposite.

1. Uber CEO Travis Kalanick

Travis Kalanick founded Uber in 2009 and it was the very definition of disruptive. The company shook up the taxi industry, often by launching its services first and dealing with regulators later. That aggressive approach built Uber into a $71 billion company, but also led to big mistakes, such as when a self-driving Uber killed a pedestrian last spring, or when it expanded into China, leading to heavy losses.

But perhaps the worst black mark against Kalanick was the systemic culture of sexual harassment at Uber, a culture whose exposure by former software engineer Susan Fowler kicked off the #MeToo movement. That mistake led to Kalanick's resignation in 2017.

2. Papa John's CEO John Schnatter 

John Schnatter sold his car to buy pizza equipment and start his company back in 1971, and he achieved success most entrepreneurs can never dream of. But he unleashed a lot of bad feeling in 2017 when he complained on an earnings conference call that the take-a-knee protesters in the NFL were hurting the company's revenues. At the time, Papa John's was the official pizza of the NFL but after those remarks, the two ended their partnership and Schnatter stepped down as CEO, though he remained chairman.

That was bad enough, but then in 2018, on a conference call with the company's marketing company, Schnatter complained that KFC's Colonel Sanders used the n-word without repercussions. Apparently trying to explain his non-racism, he went on to say that black people in Indiana where he grew up, were dragged by trucks until they died. Ironically, the purpose of the call was to prepare him for tough media questions about racism.

After this second debacle, Schnatter was forced to resign as chairman of the board as the company's stock tanked. After that, he fought a legal battle with the company to gain access to books and records after they fired him. The lawsuit was settled early this year and as of May he's off the board altogether. Now that he's finally gone, maybe the company can focus on selling pizza.

3. Wells Fargo CEO John Stumpf

John Stumpf had a 34-year career at Wells Fargo and became CEO in 2007. At some point during his tenure, bank employees began opening credit card accounts for customers that they didn't know about and didn't want. Then the bank began charging those customers late payment fees on those accounts and overdraft fees after payments were automatically transferred from other accounts. This went on for years, and at least 5,300 Wells Fargo employees were involved, leading to endless legal headaches when the fraud was finally discovered.

Stumpf resigned in October of 2016, after first trying to shift the blame to lower-level employees. This spring, his replacement Tim Sloan, a longtime executive whose reputation was also tainted by the scandal abruptly resigned as well. This is a 167-year-old company that until the last few years had such a stellar reputation that Warren Buffett became a big investor. The culture that Stumpf created or allowed to flourish managed to kill all the good feeling behind what had been one of our nation's most revered brands.