During a meeting in 2009 about the performance of the Home Affordable Modification Program, or HAMP, Elizabeth Warren, who was head of the Congressional Oversight Panel for the Troubled Asset Relief Program, or TARP, kept challenging Treasury Secretary Tim Geithner about the program's lack of progress in helping homeowners. At one point, an exasperated Geithner blurted out: "We estimate that they [the banks] can handle 10 million foreclosures, over time. This program will foam the runway for them."

The expression "foam the runway" is often used to refer to the injecting of cash into a company that's about to go bankrupt, which is somewhat similar in principle to an airport spreading fire-suppression foam on a runway to minimize the effects of an emergency landing. What Geithner was actually saying here was that home-mortgage modifications were helping the banks by preventing all of the likely foreclosures from hitting the banking system at precisely the same time. HAMP would ultimately allow the banks to spread out the foreclosures, while they restored their financial strength with government bailouts.

Now it all makes sense
Just as Geithner uttered those words, the full meaning of the bailout of Wall Street's banks became crystal clear to Neil Barofsky, who was the special inspector general for TARP. Geithner was being asked about how HAMP was helping homeowners, but he responded by saying how the program would help the banks. Barofsky now understood completely that it didn't matter if the modifications failed or if struggling borrowers ended up worse off, as long as the banks could "stretch out their pain until their profits returned."

Barofsky describes his epiphany in his outstanding Bailout: An Inside Account of How Washington Abandoned Main Street While Rescuing Wall Street. The book's central argument is that all of the bailouts resulting from the financial crisis were ultimately designed to benefit the big Wall Street banks, and the interests of homeowners, auto dealers, and other ordinary Americans didn't receive similar concern or attention. Barofsky, who was once a very effective prosecutor, builds an extremely detailed and compelling case against the government. I suspect that most readers will come away extremely angry about the fundamental unfairness of these bailouts.

The simple thesis that bailing out the big Wall Street banks was the overwhelming priority of the U.S. government in response to the financial crisis explains a lot. Why, for example, have there been so few criminal prosecutions related to the crisis? In a recent editorial in the Financial Times, Barofsky notes that there "would be no criminal prosecutions while the banks still teetered on the brink of collapse." He continued: "The risk of causing them to fail, and thereby undoing all of the bailout efforts, was too high."

And why did the ill-conceived HAMP fail so abysmally? An aggressive attempt to assist homeowners could have had adverse effects on the big banks, which would possibly, of course, put some of those institutions in jeopardy.

The inmates are running the asylum
Barofsky shows in depressing detail how the U.S. government had been thoroughly captured by the Wall Street banks. Indeed, many of the individuals running the bailout program came from precisely the same institutions that received the most benefits. For example, Herbert Allison, former assistant secretary of the Treasury for financial stability under Geithner, was a former CEO of Fannie Mae and a former president of Merrill Lynch. And, of course, Neel Kashkari, who preceded Allison in that role, was a former vice president at Goldman Sachs (NYSE:GS). Kashkari was selected for his position by former Treasury Secretary Hank Paulson, who served as chairman and CEO of Goldman. When Geithner came on board, he selected Mark Patterson, a former Goldman lobbyist, as his chief of staff.

We could, of course, go on and on like this. Regardless of whether or not our Treasury department was thoroughly captured by Wall Street, one result of the bailouts is that the largest banks are now 25% bigger than they were before the crisis. Barofsky notes that "even if TARP saved our financial system from driving off a cliff back in 2008, absent meaningful reform, we are still driving on the same winding mountain road, but this time in a faster car." Unfortunately, Barofsky doesn't see Dodd-Frank as meaningful reform -- he notes that it "didn't change the postcrisis status quo of too-big-to-fail banks; it cemented it."

The boss is a massive narcissist
Readers of this book may be surprised by the animosity between Barofsky, a registered Democrat, and Geithner. Geithner, who never embraced the principle of oversight for TARP, is portrayed as a profane bully who surreptitiously sought to undermine efforts at greater transparency for all of the various programs.

Barofsky is relentless in building his case against Geithner. He describes the Treasury Secretary's Financial Stability program as "an unprecedented trillion-dollar playground for fraud and self-dealing." And he notes that Geithner's Treasury Department showered billions on Wall Street banks, while "the terms delivered by the government seemed to border on being corrupt."

Barofsky is at his most critical of Geithner when he's discussing the $170 billion that taxpayers put up to "keep AIG's (NYSE:AIG) collapse from precipitating a meltdown of the financial system." While heading up the New York Fed, Geithner oversaw the payment of $60 billion to AIG's counterparties to buy bonds that were worth considerably less than that amount. Ultimately, Barofsky never learned why Geithner didn't try to get a better deal for the taxpayer.

One final anecdote about Geithner illustrates exactly how Barofsky felt about him. One of Barofsky's colleagues believed that Geithner suffered from narcissism, which meant that it wasn't psychologically possible for him to admit a mistake. And that diagnosis seemed dead on, when Geithner answered a question about errors he may have made in administering TARP by saying: "The only real mistake that I can think of was that there were times when we were unnecessarily unsure of ourselves. We should have realized at the time just how right each of our decisions were." Really? That was the only real mistake?

A heartbreaking work of staggering genius
Of all the major books I've read on the financial crisis, this one is the very best at showing the dysfunctional inner workings of the unholy alliance between Wall Street and Washington, D.C. As a result of the unprecedented destructiveness of the financial crisis, we actually had a once-in-a-century opportunity to reform our seriously flawed financial system, while also assisting ordinary Americans who suffered tremendously as a result of the disaster. Neil Barofsky shows us exactly how and why we missed this incredible reform opportunity. It's a very sad, depressing tale.

John Reeves has no position in any stocks mentioned. The Motley Fool recommends AIG and Goldman Sachs, owns shares of AIG, and has options on AIG. Try any of our Foolish newsletter services free for 30 days. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.