Defeat is usually an orphan. This one had many proud fathers.

In the “fiscal cliff” agreement, President Obama secured his vanishingly narrow electoral mandate to raise tax rates on a sliver of the wealthiest. House Speaker John Boehner staved off a revolt within his caucus, secured passage of a version of his own “Plan B” and lived to fight another day. The Senate earned its reputation as the slightly less dysfunctional portion of the federal government. Vice President Biden stepped up to negotiating duties that the president apparently finds distasteful.

The left got the largest tax increase in a generation — not that there is much competition. Supply-siders, at the moment of greatest liberal leverage, got the permanent codification of about four-fifths of George W. Bush’s tax cuts.

The only big political losers were tea party conservatives who had thought that 2010 was the beginning of the end of Obamaism. Even among the truest of believers, the reality now sinks in that a House majority does not govern the country.

There remains only one problem: The outcome of the fiscal-cliff negotiations is almost entirely disconnected from the actual needs of the country. It is probably a drag on short-term economic growth. It is nearly irrelevant to the long-term fiscal challenge. We have witnessed the working of a creaky, complex machine — greased and repaired again and again on the verge of breakdown — but irrelevant to the purposes for which it was designed. The machine avoided self-destruction. Nothing more.

The fiscal cliff was an artificial crisis — produced at the confluence of Bush-era tax policy and the last round of kick-the-can fiscal policy — intended to rouse political seriousness on real problems. Both Obama and Boehner desired a grand bargain that includes entitlement cuts, revenue increases and tax reform. Twice now they have failed to secure it, leaving little hope they ever will.

Some of the fault lies in personalities and parties. Obama is a poor negotiator — often mocking when he should be cajoling, and consistently misjudging Boehner’s red lines. Boehner is undermined by a fractious Republican caucus, prone to expressing ideological principles without consideration of a political endgame.

But the primary obstacle to agreement is larger than personality and even larger than ideology. The most powerful force in American politics is not liberalism or conservatism; it is middle-classism. In the economic mythology of both parties, the middle class exists only as the victim of unfair burdens. Consider the tax provisions of the fiscal cliff agreement. The very wealthy (families making more than $450,000 a year) will see a rate increase. The payroll tax will also rise, imposing a particularly regressive burden on the working poor (a $1,000 tax increase on a median income of $50,000). But the alternative minimum tax will be permanently patched to help the middle class. It is a summary of public priorities — and, not coincidentally, a good description of where the most votes can be found.

The problem is that demographic realities make current promises to the middle class, particularly the baby boomer middle class, unsustainable. The number of seniors will roughly double over the next three decades. The average senior takes more than twice as much out of Medicare as he or she pays in. The result is the most predictable, precisely quantifiable economic crisis in U.S. history.

There are only two responses. The conservative approach (which I share) is to change the entitlement system so the federal government does not need to vastly increase taxes. This would involve focusing public benefits on the poor while requiring the wealthy and middle class to accept a greater share of their health costs. The liberal approach is to increase the percentage of the economy taken in taxes well above historical norms to support the commitments of an essentially unreformed entitlement system. But this can’t be done without taxing the middle class.

A politically realistic solution would probably involve both approaches — the reorientation of entitlement programs and broadly increasing revenue (through tax reform). The fiscal-cliff deal involved neither.

Democrats and Republicans are divided on most things. They remain united in their refusal to provoke the middle class with policies that fund sustainable benefits with sufficient taxes.