Sure, Goldman Sachs (NYSE: GS) has long been considered in the upper echelon of Wall Street megabanks, consistently cranking out staggering profits and offering the utmost prestige to its investment banking clients -- not to mention a bonus pool that comes out to an average $600,000 per employee, attracting the most talented and motivated workers around.

It wasn't too shocking, then, that if there was to be one financial institution that emerged unscathed from the subprime fallout, it would be Goldman. While Wall Street neighbors like Bear Stearns (NYSE: BSC), Morgan Stanley (NYSE: MS), and Merrill Lynch (NYSE: MER) continue to stagger around, struggling to navigate the wild debt market, Goldman appears to be sitting back and enjoying the ripples caused by the wake of others' tidal waves. With such widespread problems stemming from CDOs, CMOs, ABSs, and a host of other abbreviations that'll make your head spin, how on earth did Goldman steer clear of the debt debacle?

For one, it didn't just avoid it; it made out like a bandit from it, in what has in fact become one of the largest windfall profits by a company -- nearly $4 billion.

Look out below
Goldman capitalized on the overheated market by strategically short-selling portions of the asset-backed securities that had become so coveted. Bond traders at Goldman were Johnny-on-the-spot when it came to timing the end of the glory days. Short positions were accumulated beginning in December 2006 and came to full force by February 2007, when the debt market began to tremble. As the tremors turned into a San Andreas-style shakeout in late summer 2007, Goldman's short positions were sitting handsomely in the green.

More power to 'em. A group of savvy and perhaps prophetic traders at Goldman recognized the overvaluation and lack of risk foresight that was taking hold of the debt market and pounced on the opportunity. This is, after all, their job, right?

Wait a minute ...
Right. But isn't this the same Goldman Sachs that took part in issuing, packaging, slicing, and selling bundles of asset-backed debt during the past several years, charging multimillion-dollar fees to its clients all along? You bet it is.

Goldman Sachs -- which was indeed one of the largest issuers of mortgage-backed securities over the past two and a half years, to the tune of upward of $100 billion, according to ABalert.com -- made huge amounts of money betting against what was in essence the same products it had been peddling to clients in previous years. Boy, even infomercial tycoon Ron "But Wait!" Popeil would be impressed by those sales tactics.

Do as I do, not as I did
To add insult to injury, former Goldman CEO Hank Paulson, who now presides over the Treasury Department for the United States, was Goldman's fearless leader during much of the period when the company pushed toxic debt onto the market. Now, as if thumbing his nose at those who bought into the debt products, Paulson has proposed a taxpayer-funded bailout program to save the industry and mortgage participants such as Countrywide Financial (NYSE: CFC) from a complete demise that might spark more serious ramifications for the economy if not contained. Is this capitalism at its finest?

Survival of the keenest
What makes hedge funds so alluring to many investors is the prospect of a manager who is forced to proverbially "eat his or her own cooking." A business where the company doesn't eat until the clients have been fed encourages nothing but the most honest behavior and aligns its interests with that of its clients.

When an industry leader like Goldman Sachs partakes in using its own money to capitalize on the weakness of its own products, we should seriously think about the deeper interests of our banking sector: Is it out to finance the greater good of capitalism, or skim off a buck of profit in any manner possible? While the former has no doubt been a serious factor in promoting this nation's prosperity over the past century, the latter could no less bring it to its knees if not properly contained.

Despite massive writedowns from nearly every other financial firm, analysts and investors are treating them as the Wall Street golden child. While all the firms may well deserve that title, because of their profitability and their earning potential, they should be meticulously scrutinized when weighing the now-serious debt problems our financial system faces.

For related Foolishness:

Help us in our goal to give every young person around the globe a financial education! Learn more about the new direction of Foolanthropy, now in its second decade, here.