"I like buying companies that can be run by monkeys -- because one day they will be."
-- Peter Lynch

Great businesses that are relatively easy to understand are better investments than poor or average businesses run by great leaders. I'll go one step further and say that Wall Street routinely bestows iconic status on CEOs who, regardless of their leadership skills, were in many cases in the right place at the right time.

There is no doubt that good management can make a positive difference, just as poor management can have a negative effect. If you want to make money, however, the trick is to focus on the company fundamentals -- not on the CEO.

CEO fright
Consider the case of Hewlett-Packard (NYSE:HPQ). Dell (NASDAQ:DELL) was eating HP's lunch in 2002, and under then-CEO Carly Fiorina, Hewlett-Packard made its controversial acquisition of Compaq. Although Walter Hewlett, a former director and son of one of the company's founders, led a campaign against the acquisition, Fiorina won the day when shareholders voted in favor of the plan by a narrow margin (838 million for, 793 million against).

That vote came in the spring of 2002; some 30 months later, in February 2005, the Hewlett-Packard board asked Fiorina to step down. The board was likely tired of the write-downs and merger-related charges that reduced shareholder equity and tarnished the company's annual income statements.

But if you'd looked at the company's free cash flow and ignored the CEO hubbub, you would have noticed a dramatic improvement. Shares could be had for a little more than $20 the day before Fiorina's downfall, and today they're up more than 50% (to $31). Why? Because the business has continued to perform well, and the market eventually took notice.

CEO flight
Another interesting example is star CEO James McNerney's jump from 3M (NYSE:MMM) to Boeing (NYSE:BA) last June. The day after McNerney left for Boeing, 3M shares bottomed out at $71 -- having been above $78 just a week earlier. There was nothing untoward in McNerney's reasons for leaving -- he was president of General Electric's (NYSE:GE) Aircraft Engines division prior to joining 3M, and he simply viewed the CEO job at Boeing as his dream job -- yet the market seemed to think 3M would plummet in his absence.

Of course, 3M didn't plummet in the aftermath of his departure. The conglomerate kept on performing and shares recovered to trade as high as $88 in the past year. This is not to say that McNerney was worthless. He's presided over a nice recovery at Boeing, which is up nearly 30%. However, I think that resurrection speaks more to the ethical and managerial shortcomings of Boeing's previous regime.

The Foolish bottom line
Solid, cash-generating companies that are poorly managed are often good places to put your money, because if current management can't fix the problems, you can be sure the board will eventually effect a change. Similarly, good companies like 3M don't go downhill just because a star CEO jumped ship. In either case, you can boost your returns when the market overreacts on the downside.

Philip Durell is the advisor/analyst for the Motley Fool Inside Value newsletter service, where he finds great companies that the market is letting you buy on the cheap. You can view Philip's entire list of recommendations -- which are collectively beating the market by more than three percentage points -- with a free 30-day guest pass to the service. There is no obligation to subscribe.

Philip owns shares of Dell. Dell and 3M are Inside Value recommendations. Dell is also a Stock Advisor pick. The Fool has a strict disclosure policy.