Imagine you are a senior official of the Chinese Communist Party trying to figure out whether democracy is a good idea. The brinkmanship over raising the debt ceiling is a prime example for the argument that democracy is irrational, right?

So say the commentators, one and all. Just think of the relief you would feel as a Chinese official knowing that you will never have to deal with anyone as crazy as the Tea Party -- except maybe by locking them up.

But you would be wrong. More significant than the Tea Partiers’ willingness to push things to the edge was their ultimate judgment not to go over it.

The real story of the debt-ceiling showdown is not that democracy is pathological. It is, rather, that the electoral system -- even when plagued by partisanship -- is the best ever devised to defang angry citizens and the political movements they form. Once again, U.S. democracy has demonstrated that it is a machine for generating moderation and preserving the ideological center.

You may be forgiven for thinking this sounds as crazy as, well, a Tea Partier in a sweltering D.C. summer. After all, the new congressmen elected as a result of the Tea Party insurgency within the Republican Party brought the country -- and by extension, the world -- scarily close to some sort of financial meltdown.

Democrats and traditional Republicans in Congress understood that maintaining the credit of the U.S. was serious business. By contrast, until the very last moment, it seemed possible that the Tea Party representatives just didn’t understand the basics of financial economics. Their idea of ending business as usual was starting to look like ending the financial world as we know it.

Bad Presidential Advice

Had the Tea Party actually precipitated a crisis, the lesson could well have been that democracy is too risky a form of government to be charged with a serious responsibility like stewarding the global economy.

Hints of this could be found among those who wanted the president to raise the debt ceiling unilaterally. Some were saying that the laws and the Constitution must be interpreted flexibly to avoid self-inflicted democratic disaster. Others -- including one of my academic colleagues -- were going further, calling for President Barack Obama to play the Prince (or the Fuehrer) and save the republic by asserting that necessity trumps the rule of law.

Fortunately, not everyone lost his head. The public remained relatively confident of a deal. And the markets never panicked. Why? What was the insight that preserved these wise crowds from the dangerous errors of the eggheads?

The answer has everything to do with how politicians’ incentives work. Elected by angry constituents demanding change in the form of spending cuts, the Tea Party congressmen had to take the opportunity to show they meant business. This was Democracy 101: If people elected you on a single issue, you had better signal to them that you take their concerns seriously. If not, you are an obvious hypocrite, and you deserve to lose your next election.

Democracy 102 was the way the Tea Party representatives managed their bargaining position. Their optimal strategy was to convince the rest of Congress and the president that they might just be crazy enough to block a deal unless they got enough of what they wanted.

Stopping Speaker John Boehner’s first plan before it came up for a vote, just a couple of days before D-Day, was the perfect way of showing they might be that crazy. Do you recall that little voice of doubt we all felt, wondering if they were ignorant or foolish enough to take us into oblivion? That was their negotiating power hitting its high point.

An Extreme Moment

But that extreme moment was also where the Tea Party congressmen’s incentives shifted. After all, they and their supporters also have pension plans. They, too, have savings (to the extent anyone has savings anymore) and family members who need jobs. The Tea Party actually doesn’t want the economy to collapse -- much less be held responsible for it.

Once they were elected to Congress, the Tea Party congressmen had a stake in the system. They wanted to please their constituents -- but they also wanted to preserve their positions as members of America’s (elected) ruling elite.

They were no longer radicals bent on breaking the system. Now they wanted to change it from within. This was democracy at a higher level: the kind of democracy that co-opts would-be rebels by making them a part of, and dependent on, the system.

Once the Tea Party members of Congress reconceived themselves as part of the governing elite, what they wanted was for the debt ceiling to be raised -- without too many of them having to vote for it. In this they were exactly like ordinary politicians, who often find themselves to be in favor of bills before they are against them.

The horse-trading of politics is set up so that a compromise can be reached with as few elected officials as possible voting in ways that will anger their own constituents. All members of Congress know this. They all want to get re-elected. Normally, none of them is going to run for re-election against any other. Within some boundary, they accommodate each other’s needs. (In the end, 32 of the 60 Tea Party Caucus members voted for the compromise.)

The upshot was that the final deal, excoriated by hard-line Republicans and Democrats alike as a tremendous concession to the other side, is somewhere toward the median of American public opinion. It may be incoherent. But in the most literal sense it is undoubtedly centrist.

Behold the genius of democracy. Insurgent political forces can be brought into the tent -- and domesticated. Whatever the Tea Party congressmen might say to the television cameras, the fact is that today they are just another bunch of politicians. It’s something we should be grateful for. And it’s a lesson any Chinese Communist Party official would do well to understand.

(Noah Feldman, a law professor at Harvard University, is a Bloomberg View columnist. The opinions expressed are his own.)

To contact the writer of this column: Noah Feldman in Cambridge, Massachusetts, at noah.feldman@harvard.edu

To contact the editor responsible for this column: Tobin Harshaw at tharshaw@bloomberg.net