John Boehner, the speaker of the US House of Representatives and longtime legislative leader of Republican battles with Barack Obama, announced his resignation, effective at the end of October, on Friday. It's an event that is simultaneously shocking and predictable. Nobody expected Boehner to stay in what had become a thankless, exhausting job for very long. But with no real rival for the leadership on the horizon, nobody expected him to leave so soon, either.

The suddenness of the departure — with just weeks between the announcement and the effective date — is a surprise within a surprise. A US legislative leader normally either steps down following an electoral defeat or else (like Harry Reid, leader of the Senate Democrats) announces it well in advance and calmly leads the troops through one last election campaign. Boehner is dropping the mic in an unexpected and chaotic way, with hard-to-predict consequences for the future of his party and the legislative agenda.

Much attention will focus on why Boehner chose to resign at this particular moment, but Boehner's personal fate and quirks are the least significant aspect of this story.

The broader context is that Boehner has spent his years in office caught up in a partisan and institutional dynamic that he ultimately couldn't break out of, even as he proved unusually adept at controlling it. His departure will do nothing to alleviate the cycle of unrealistic conservative demands leading to crisis at the highest level of government, and the fact that the most experienced practitioner of the cat-herding required to govern in this environment will soon be gone means that serious problems at least could be on the way this winter.

What's a House speaker?

The practical power of the speaker of the House has varied considerably over time — and Boehner has presided over a particularly strange moment in the position's history.

The speaker is supposed to serve as the House's institutional voice. He or she doesn't need to be a member of the majority party, or even a sitting member of Congress at all. Republicans could elect Bill Gates speaker if they so chose.

But no one ever does that. In practice, the way it works is that the majority party members decide among themselves who their nominee is and then vote for him or her in a block. The majority party's leader, in short, becomes speaker. That's how it has always worked, except for a brief period in the 1850s when the issue of slavery broke the party system down.

In the highly partisan politics that prevailed in the decades before World War I, the speakership was enormously powerful. The decline in party polarization that characterized the middle of the 20th century was associated with a reduction in party leaders' power, in favor of authority tending to diffuse to committee chairs selected by seniority. Liberal reformers in the 1970s aimed to undercut the power of the committee chairs by re-strengthening the speaker.

That process took time, but by the mid-1980s they had successfully entrenched the principle that only bills supported by the majority party leadership — including the speaker — could get a vote on the House floor. That principle began to break down under Boehner, who repeatedly cut deals with the Obama administration that most of his members would vote against.

But this conflict between Boehner and his base was much more about tactics than about objectives. Conservative grassroots activists have repeatedly pressed Boehner to endorse high-stakes gambles to try to force the Obama administration to make policy concessions that Congress lacks the constitutional authority to enact on its own. Boehner has repeatedly tried to push in the direction of caution, preferring to defer potentially unpopular conflicts and focus on trying to win elections. Many conservatives see this as a lack of principle or commitment, while most moderate-to-liberal observers think Boehner is merely being practical. But the result was that Boehner's speakership was unusually divided between his duties as speaker of the House, a figure who's supposed to keep American governance on a prudent course, and his role as leader of the Republican Party.

Why is Boehner resigning?

According to a not-very-informative statement issued by his office, he is resigning because his longstanding "plan was to serve only through the end of last year" but he had to change his plans because former Majority Leader Eric Cantor's "loss in his primary changed that calculation."

In other words, Boehner had to stay on because Cantor — his heir apparent — was cut down in a primary challenge. At the same time, "the Speaker believes putting members through prolonged leadership turmoil would do irreparable damage to the institution." In other words, he's resigning with little advance notice so Republicans don't spend the next year angling against each other.

There is no doubt some truth to all of this, but the more banal reality is that this resignation is closely pegged to the timing of yet another fight about a possible government shutdown.

This one is over the fact that through Medicaid and Title X family planning grants, some federal money ends up reimbursing Planned Parenthood for health-care services. These federal funds cannot be used to pay for an abortion, but Planned Parenthood does perform abortions — and lobby vigorously for abortion's legality — and since money is fungible, this means federal funds indirectly support the availability of abortions in America. Many conservatives have talked themselves into the view that refusing to pass federal appropriations bills unless the White House agrees to defund Planned Parenthood is a smart idea, and so far they've got the House GOP on their side.

But most observers believed they'd seen this story before and they knew how it would end. Concurrent with his resignation, Boehner said he will bring to the floor a bill that does not defund Planned Parenthood. A handful of Republicans will join with the bulk of Democrats to pass it, and the GOP caucus will be rolled.

In shutdown news, Boehner also said in the meeting that House will take up a clean spending bill next wk, which is expected to pass w/ Dems — Tarini Parti (@tparti) September 25, 2015

This has already happened on a number of dramatic occasions since Boehner became Speaker in January 2011:

The 2011 debt ceiling fight, in which Republicans had initially threatened the country with default unless Obama agreed to massive cuts in entitlements.

The 2013 "fiscal cliff" fight, in which Republicans had tried to insist on the permanent extension of all the Bush tax cuts.

The January 2013 battle over funding for Hurricane Sandy relief, which Republicans initially tried to make contingent on offsetting spending cuts elsewhere.

The October 2013 government shutdown, where Republicans initially refused to fund the federal government unless Obama agreed to the repeal of the Affordable Care Act.

The January 2014 debt ceiling increase, which Republicans initially tried to make contingent on some form of military pension reform.

The February 2015 Department of Homeland Security funding battle, in which Republicans initially tried to make DHS funding continent on Obama rescinding his executive actions on immigration.

Each of these moves has at least raised the possibility that Boehner would lose the confidence of his caucus and be deposed. And, indeed, in the 2011 and 2013 iterations of these standoffs, an anti-Boehner coup looked like a very real possibility. But Eric Cantor's unexpected loss in his 2014 primary eliminated the main possible leader of an anti-Boehner plot. Since that time, Boehner's job has looked more secure if only by default — you can't beat something with nothing. At the time, disgruntlement with Boehner remained deep and powerful.

The most recent threats against Boehner from the Tea Party faction of his caucus did not look especially likely to succeed. But it seems that Boehner prefers to resign and move on to other things after one last big vote rather than hang on for months of additional struggle in what had become a thankless job.

Why had Boehner's speakership become so thankless?

The basic issue is that for years now he's been the most powerful Republican Party politician in America, and yet rank-and-file Republicans have come to despise him. News of his resignation was greeted with cheers from grassroots activists.

Rubio to Value Voters: "Just a few mins ago, Speaker Boehner announced he will be resigning." HUGE ovation. Many standing. — Steve Peoples (@sppeoples) September 25, 2015

Widespread dislike of Boehner by conservative activists and talk radio personalities meant that even GOP backbenchers who liked Boehner were pressured to constantly defy him or agitate for more extreme moves, while backbenchers who genuinely disliked him were constantly egged on to pursue their feud.

The tougher question is why, exactly, Boehner is so disliked.

Repubs still mostly disapprove of their Congress leaders, while Dems mostly approve of theirs. http://t.co/X4tpMwneEo pic.twitter.com/NGWBlfiKFV — Frank Luntz (@FrankLuntz) May 29, 2015

Republican consultant Mary Matalin told Vox's Andrew Prokop that Republicans are angry over their party leaders' "seeming inability to deliver conservative policies despite monumental electoral gains at all levels." But congressional Republicans have, in fact, forced substantial rollbacks in federal discretionary spending, while Republican governors and state legislatures have done the same at the state level. The population of unauthorized residents of the United States is declining, and Boehner stood strong and refused to allow a vote on bipartisan immigration reform legislation that passed the Senate.

Boehner's view is that House Republicans have accomplished just about all they can realistically accomplish. "Almost all of the donors understand that, you know, without a Republican in the White House, or 60 votes in the Senate, there are limits to what you could accomplish," he told Politico, contrasting the positive view that the Republican donor class had of his performance with the negative view that conservative activists had of his performance.

To achieve more things, Boehner believed, correctly, that conservatives need a Republican president who will sign laws, appoint judges, and issue executive orders. Under the circumstances, they ought to be avoiding extreme tactics that only make winning the White House harder — things like a government shutdown, or a messy coup attempt against the speaker of the House.

How has Boehner's reputation shifted over time?

When Boehner first became House minority leader in the wake of Democrats' sweeping wins in the 2006 midterm elections, he was regarded as a bit of a non-entity. NPR described him as "a survivor by nature" who "worked his way to the top of the GOP leadership with a style that stresses consensus-building rather than ideological purity."

His key qualifications for the job were that he was a prolific fundraiser who nonetheless was sufficiently distant from Tom DeLay's leadership operation to not be taken down in the blaze of corruption scandals that helped sink the GOP majority of the mid-aughts. But after he won the majority, then held it, then expanded it in three successive midterm elections, all while repeatedly rolling his caucus to keep the government functioning, many opinion leaders began to develop a higher esteem for the man.

In July 2011 Ross Douthat referred to him as "John Boehner, escape artist," but by January 2013 he was "Boehner, American hero."

"Boehner was a damn good garbageman," Ezra Klein wrote, "at a time when House Republicans produced a whole lot of garbage ... [h]e was handed an unfolding disaster, and he made it — through grueling, humiliating work — into something approximating a success."

Would you say Boehner's rise and fall illustrates a larger irony of American politics?

So glad you asked. I would, in fact, say that.

The thing about Boehner is that however cleverly you think he played the bad situation dealt to him as speaker, he very much obtained the speakership by encouraging and deploying the very same ideas that his internal enemies later turned against him. It is easy to forget this in retrospect, but in early 2009 Barack Obama was enjoying approval ratings in the high 60s. Even a third of self-described Republicans said he was doing a good job. The usefulness of deficit spending and fiscal stimulus to bolster a failing economy was, at the time, widely accepted. John Boehner and Nancy Pelosi both voted for a stimulus bill in 2008, they both voted for TARP, and they both voted for the bill authorizing the nationalization of Fannie Mae and Freddie Mac.

But rather than cut a deal with the White House over a new round of stimulus in 2009, Boehner whipped his caucus into unanimous opposition and continued that posture of unrelenting, uncompromising opposition to Obama administration initiatives throughout the next two years.

Boehner didn't just argue that Obama's policies were misguided in some respects. He argued that Obama was "snuffing out" the America that he grew up in and that, as a result, "there's a political rebellion brewing, and I don't think we've seen anything like it since 1776."

The dual-pronged strategy of refusing to compromise on Capitol Hill while whipping the grassroots into a frenzy about Obama's looming tyranny worked. Boehner succeeded in keeping Republican hands entirely clean of responsibility for the state of the economy, and mobilized grassroots conservatives to turn out in much larger numbers than liberals in 2010.

The result, however, was that after winning the midterms, the people who put Boehner there expected him to act as if he actually believed opposition to the Obama administration's policies was comparable to the Revolutionary War against Great Britain. He's never really been willing to do that, because it's ridiculous. But he did say it.

And then after winning the election, he did spend the entire winter of 2010-'11 saying that he was willing to act that way in the lead-up to the original debt ceiling fight. After the resolution of that fight, Boehner proved himself to be an adept garbageman, but in a sense he was the one who threw garbage all over the yard in the first place.

What happens next?

Kevin McCarthy, the California Republican who replaced Cantor as the No. 2 guy in the GOP leadership, is the odds-on favorite to replace Boehner.

MORE CANDIDATES: Markwayne Mullin talking to colleagues about running for whip. TOM PRICE will run for majority leader. — Jake Sherman (@JakeSherman) September 25, 2015

McCarthy will presumably face some opposition from the right, but at the moment the leading right-wingers in the House seem to be talking about running for the lower-end jobs that will be opening up as a result of the likely McCarthy ascension.

The underlying issue is that for all the anger directed at Boehner, his departure changes nothing. There is simply an ineradicable tension between the idea of using tactics of extreme brinksmanship to try to force policy changes on the Obama administration and the more normal idea of passing message bills and trying to win in 2016.

No pattern in US politics as consistent as GOP house leaders deposed by conservative rebels. — Daniel Schlozman (@daschloz) September 25, 2015

McCarthy does not have any well-known differences of opinion with Boehner and will likely find himself wrestling with all the same problems. But any alternative to McCarthy would have the exact same problem. The fact that he's not immediately facing top-tier opposition for the job — and the fact that the best-known House Republican, Paul Ryan, isn't running — are both signs that everyone knows the job has become essentially undoable. So the most likely scenario is that we get Speaker McCarthy doing more or less exactly what Speaker Boehner would have done, and getting yelled at by all the same people.

The other possibility is that either McCarthy loses to someone more radical, or else he feels less self-confident than Boehner and something crazy happens.

I think conservatives have no clue how bad the Boehner resignation is for them. — Sean T at RCP (@SeanTrende) September 25, 2015

Welp, guess you have to put at least an outside chance of Ds taking the House now, up odds of D POTUS, senate considerably. — Sean T at RCP (@SeanTrende) September 25, 2015

The immediate consequence of Boehner resigning is to take an unpopular, unnecessary government shutdown over Planned Parenthood off the table. But the longer-term consequence is to make it less clear that future standoffs of that nature will be resolved so easily. A post-Boehner House could mean a return to the government-by-crisis days of 2011 that we saw when Boehner first took over — or something even worse.

VIDEO: John Boehner admits GOP caused shutdown of the government