Can’t say rating agencies don’t have a sense of humor. Last weekend, the painfully embarrassing bipartisan political drama to raise the U.S. debt ceiling centered around doing whatever it took to avoid losing our sacrosanct AAA credit rating. This weekend, under cover of a Friday night, with markets safely closed and global traders gone for the weekend, the best-known rating agency, Standard & Poor’s, basically mooned U.S. economic policy.

On one main score, S&P’s downgrade rationale is right: Washington policy-making is decidedly "dysfunctional.” In fact, that’s a seismic understatement.

But that would also be a fair description of S&P’s decision making in recent years. Remember: In the run-up to this very financial crisis, for which our debt-creation machine at the Treasury Department ramped into overdrive, S&P was raking in fees for factory-stamping "AAA" approval on assets whose collateral was hemorrhaging value.

That high-class rating was the criterion hurdle that allowed international cities, towns, and pension funds to scoop up those assets, and then borrow against them because of their superior quality, and later suffer devastating losses and bankruptcies when the market didn’t afford them the value that the S&P AAA rating would have implied.

Perhaps this downgrade is S&P’s way of saying, we’re on it now—we’re not going to give bad debt a pass anymore. Earlier this week, it downgraded a bunch of Spanish and Danish banks that are sitting on piles of crappy loans. Then, of course, there was Greece.

But just like Washington, the agency is missing the main reason for the recent upshot in debt. There’s a bar chart on the White House website that cites an extra $3.6 trillion of debt created during the Obama administration that is labeled for "economic and technical changes." That figure doesn’t include the $800 billion of stimulus money delineated separately, which is more deserving of that moniker.

But it’s not as if the GOP, in particular its Tea Party wing, screamed once about that $3.6 trillion figure during the latest Capitol cacophony. Instead, the Treasury Department made up a name for Wall Street subsidies, and Congress went along. And until this spring, when the debt-cap debate geared up a notch, S&P was pretty mum about this debt and exactly why it was created.

Recall, banks concocted $14 trillion of toxic assets that S&P rated AAA between 2003 and 2008—or higher in creditworthiness than it now deems the U.S. government to be. These banks now store $1.6 trillion of excess Treasury debt on reserves at the Fed (vs. about zero before the 2008 crisis) on which interest is being paid. In addition, the Fed holds $900 billion of mortgage-related assets for the banks. Plus, about half a trillion of debt is still backing some of AIG’s blunders, JPMorgan Chase’s takeover of Bear Stearns, the agencies that trade through Wall Street, and other sundries. That pretty much covers the extra debt since 2008—not that S&P mentioned this.

But yes, S&P is right. There is no credible plan coming from Washington to deal with this excess debt, nor is the deflection of the conversation to November fooling anyone, but that’s because there’s been no admission from either party as to why the debt came into being.

The bottom line? In the aftermath of the financial crisis, the U.S. created trillions of dollars of debt to float a financial system that was able to screw the U.S. economy largely because banks were able to obtain stellar ratings for crap assets, which had the effect of propagating them far more quickly through the system than they otherwise would have spread. The global thirst for AAA-rated assets pushed demand for questionable loans to fill them from the top down, as Wall Street raked in fees for creating and selling the assets. Later, banks received cheap loans, debt guarantees, and other financial stimulus from Washington when it all went haywire, ergo debt.

Despite a few congressional hearings on the topic, the rating agencies were never held accountable for their role in the toxic-asset pyramid scheme. Now they are holding the U.S. government accountable. The U.S. government deserves it, not because spending cuts weren’t ironed out, but because Wall Street stimulus wasn’t considered, the job market remains in tatters, and there’s no recovery on the horizon.

Still, the downgrade demonstrates that the U.S. doesn't run the show—the private banks and rating firms that get paid by them do.