The election of 2016 was an unexpected and smashing Republican victory—but it also represented the calling of an awfully big bluff. For seven years, Republicans had pledged to repeal the Affordable Care Act and replace it with a superior, but always unspecified, alternative. Donald Trump famously claimed that he could cover "everybody" at a fraction of the cost of the ACA, but he was hardly the only Republican politician to promise the American people that they could keep everything they liked about Obamacare while painlessly jettisoning the parts they didn't like—the taxes, the mandates, the high premiums.
Once Trump was elected, repeal was no longer merely a symbolic position useful for rallying the Republican base against Obama and the Democrats, but represented a well-established policy commitment to which the party had unavoidably staked itself even though health care reform is predictably treacherous for the party attempting to pass it. Congressional Republicans—first in the House, and then in the Senate—took to developing actual repeal legislation with all the enthusiasm of a teenager who had promised to mow the lawn in exchange for being allowed to go out with his friends the night before, and now had to make good on his end of the bargain.
For in fact there is no magic policy formula that preserves the popular aspects of the ACA while abolishing the unpopular provisions—especially while also remaining true to conservative ideological principles. Many people would have to pay more for their health insurance and many others would lose their coverage entirely. As public opinion polls showed, support for various versions of the Republican health care plan among the electorate was consistently dismal.
What followed over the succeeding few months—right up until the moment that John McCain became the 51st vote in the Senate against repeal early Friday morning—was an attempt by a significant proportion of the Republican conference in both houses of Congress to maneuver so as to avoid blame from the party base if repeal failed while also avoiding responsibility for the consequences of its passage. The result of this mentality was some of the strangest and most confusing legislative behavior that veteran Congress-watchers had ever seen. Bills with wide-ranging policy implications were written in a single afternoon. Individual members made public demands that they then abandoned without explanation days, or sometimes even hours, later. Party leaders kept the process alive by promising that collective agreement around a single set of policies, though never realized, was merely sitting just beyond the next procedural vote.
Even the final Senate bill, the so-called skinny repeal, was sold to Republican senators as merely a vehicle to enter a conference committee with the House that would at long last produce that ever-elusive consensus bill. One Republican called skinny repeal a "fraud" and "disaster" (but voted for it anyway), others warned that while the Senate might pass it the House was strictly forbidden from doing so, and hardly anybody bothered to show up to defend it on the Senate floor—leaving Budget Committee chairman Mike Enzi to filibuster interminably in the face of critical remarks from the Democratic side of the aisle.
As unprecedented—and somewhat ridiculous—as all this was, there was a certain logic to keeping repeal alive, or at least trying to leave its corpse in the lawn on the other side of the Capitol. And nobody wants to be the disloyal teammate. It took a dramatic late-night defection by John McCain, in collaboration with previous dissenters Susan Collins and Lisa Murkowski, to administer the apparent kill shot while onlookers literally gasped in surprise.
Undoubtedly, the three nay-voting Republicans are not the most popular members of their party at the moment—a stunned and furious Mitch McConnell didn't bother to hide his resentment of their actions after the vote on the Senate floor—but they may have merely spared their colleagues more wasted time in the weeks ahead as the party continued to search fruitlessly for consensus. Or, alternatively, agreement might have been achieved, and a bill sent to the president—but then Republicans would have been forced to defend an extremely unpopular piece of legislation in the 2018 and even 2020 elections, confronted with tearful or enraged constituents who had lost insurance and other benefits. McCain, Collins, and Murkowski may never get the recognition from fellow Republicans for doing so, but it's quite possible that they just saved their party's majority.