General Motors (NYSE:GM) has a huge problem: Its cost structure is out of whack with the current globally competitive marketplace. Because of its former market dominance, the company made promises to its employees that it can no longer reasonably keep. Thanks to those promises, powerful and inflexible union pressure, and sticky government regulations, GM has been slow to make much-needed changes.

In fact, last year I warned that General Motors might be driving toward oblivion. Yet it looks like my prediction was premature. Since closing out 2005 at $19.42 a share, its stock has skyrocketed to nearly $33. Throw in $0.75 worth of dividends, and the year-to-date return is astounding -- more than 70%! That's far better than "hot" stocks such as Research In Motion (NASDAQ:RIMM) and Gilead Sciences (NASDAQ:GILD), which have returned 66% and 29%, respectively.

What happened?
Does this amazing return mean that General Motors is now a far superior company than it was at this time last year? Heck, no. All it means is that General Motors didn't keel over, bankrupt. Even with its massive employee buyouts and other "rightsizing" activities, it's still saddled with most of the same legacy and inflexibility problems that got it in trouble in the first place.

The fact is that Japanese giants Toyota (NYSE:TM) and Honda (NYSE:HMC) are continuing their relentless expansion and profitable growth as General Motors restructures. Even if GM's revitalization efforts are ultimately successful, they will at best stem the bleeding. As many turnaround opportunities have discovered before, you can't simply cut your way to growth.

But the reason GM has done so well is that a company's return is often a product of the market's expectations. And simply put, the market didn't expect a whole lot out of GM. Simply by staying out of bankruptcy, GM has done much better than expected. Its year-to-date returns illustrate the classic "cigar butt" investment, exactly the type of company that made value investing pioneer Benjamin Graham famous.

History repeats itself
The GM story isn't unique. I previously explained how investors earned an 80% return in less than two years by buying ailing insurance company Presidential Life (NASDAQ:PLFE). Like GM, the market left Presidential for dead, thanks to suffering operations and related losses.

You also could have tripled your money in just over a year in specialty foods and ethanol processor MGP Ingredients (NASDAQ:MGPI). The period between when the Atkins diet frenzy died and the ethanol mania kicked into full swing was a tremendous time to own that company, which benefited from both trends.

Even one of Warren Buffett's most celebrated investments, financial giant American Express, came on the back of a scandal that almost sunk the company. The reality of history is that one of the best times to buy a stock is when the business outlook is bleakest -- just so long as the company has a legitimate chance of surviving without bankruptcy.

The right mind-set for success
Dumpster diving, while lucrative, is not for the faint of heart. To make money investing this way, you absolutely must keep your sights firmly fixed on your target company's true worth. Because we don't know in advance when things will really be their worst, though, we can't predict the exact bottom of a stock.

Remember that every company that's not headed for bankruptcy is worth something -- even the lousy ones. As long as you are willing to be contrary and hold your nose when you buy shares, you can be a smarter investor and make a lot of money.

If that sounds like a methodology you can profit from, join our ranks and beat the market as a Motley Fool Inside Value investor. Just click here for more information.

At the time of publication, Fool contributor and Inside Value team member Chuck Saletta owned shares of General Motors. The Fool has a disclosure policy.