Correction: An earlier version of this column incorrectly reported that the Justice Department had reviewed 20,000 pages of documents and e-mails supplied by Standard & Poor’s. S&P provided the government with 20 million pages of documents and e-mails. The following column has been corrected.

The Obama administration’s suit against the rating agency Standard & Poor’s makes for riveting headlines and lousy history. We want to blame the financial crisis and Great Recession on greed and dishonesty. The charge that S&P rigged bond ratings for its own gain — providing artificially high ratings on the mortgage-backed securities that inflated the credit bubble — fits this self-serving morality tale. The discomforting reality is that the financial collapse resulted from an extended period of prosperity, which led to weakened credit standards and inspired wishful thinking about the permanence of economic growth.

The administration is asking “in excess of $5 billion” in penalties from S&P, an amount it says reflects the losses caused by the erroneous ratings. Law professor Jeffrey Manns of George Washington University notes that the top three ratings agencies (S&P, Moody’s and Fitch) provide 96 percent of all ratings. A $5 billion penalty might put S&P’s parent company, McGraw-Hill, into bankruptcy and force S&P to close. A swarm of state lawsuits compounds the possibility. With many bonds rated by two agencies, Manns wonders whether it would be good public policy to convert the existing oligopoly into an effective monopoly.

The stakes here are enormous. After reviewing 20,000 pages of documents and e-mails from S&P, the Justice Department says that S&P hyped ratings of residential mortgage-backed securities (RMBS) and collateralized debt obligations (CDOs) to generate business. Banks and investment banks selling the securities pay for the ratings; higher ratings would attract more buyers. So S&P delayed introducing new risk models that would have lowered ratings, says Justice. S&P’s advice was not “independent” as claimed but was tainted by the pursuit of profits. Each CDO rating fetched fees from $500,000 to $750,000.

S&P calls the complaint one-sided. Hardly anyone, S&P says, anticipated the devastating crisis. The initial ratings were mirrored by other agencies. As mortgage delinquencies rose, ratings were revised. In 2006, S&P downgraded 400 RMBS ratings.

The suit reflects the conspiracy theory of the crisis: Sleazy bankers, waving distorted ratings, sold overvalued RMBS and CDOs to unsophisticated investors. It’s a seductive story contradicted by the facts. As Bloomberg columnist Jonathan Weil has written, many banks and investment banks that sold these bonds also bought them for their own portfolios. They thought the bonds had value. These included Citigroup, Merrill Lynch and Bank of America. By mid-2008, the 20 most exposed financial institutions had suffered nearly $300 billion in losses, according to Bloomberg.

It wasn’t just bankers who misjudged mortgages. So did global banking regulators. Under the so-called Basel rules, banks are required to hold $8 in capital for every $100 in ordinary consumer and business loans. (Capital is a buffer against losses.) But residential mortgages were considered sufficiently safe to justify a requirement half that — $4 per $100 loaned. These rules remain in effect.

Paradoxically, the financial crisis’s real origins lie in the economy’s good performance and its corrupting effects on public opinion. By 2007, the United States had experienced only two modest recessions (1990-91 and 2001) in a quarter-century. Since 1990, the unemployment rate had averaged 5.4 percent. Economists touted the “Great Moderation,” signifying fewer and milder slumps.

With a more stable economy, risk seemed to diminish. People could borrow more because their repayment prospects were better. Another consequence was a growing belief that “house prices would continue to rise rapidly for the foreseeable future,” write economists Paul Willen, Christopher Foote and Kristopher Gerardi in a paper for the Boston Federal Reserve Bank. As this notion took hold, it was “not surprising to find borrowers stretching to buy the biggest houses they could and investors lining up to give them the money.”

By the logic of rising prices, housing was a fail-safe investment. Homeowners would reap huge profits from higher values. Lenders would earn interest and, in case of default, be protected against losses by increased prices. These ideas created a “collective self-fulfilling mania,” argue Willen, Foote and Gerardi. Credit standards were eased; permissive practices — sloppy, reckless and sometimes illegal — grew. But they were more consequence than cause of the housing boom, which lay in the mass psychology of prolonged prosperity.

This is a subversive theory, because it implicates millions of Americans and deprives us all of a self-righteous sense of victimization. Good events conditioned us to have bad expectations.

Until the bubble burst, few understood what was happening. Fed Chairman Ben Bernanke recently admitted that he was caught off guard by the crisis. But the Obama administration holds S&P to a higher standard. There must be villains, and they must be punished. Someday this case may be settled. But for now S&P is a scapegoat, and the Department of Justice has become the Department of Blame.

Read more from Robert Samuelson’s archive.