Miles Scott, dressed as Batkid, at a rally outside San Francisco City Hall with Mayor Ed Lee, Batman and Miles' mother, Natalie Scott, on Nov. 15. Photograph by Jeff Chiu/AP Photo
Miles Scott, dressed as Batkid, at a rally outside San Francisco City Hall with Mayor Ed Lee, Batman and Miles' mother, Natalie Scott, on Nov. 15. Photograph by Jeff Chiu/AP Photo

Last week’s transformation of San Francisco into Gotham City, all in service of a 5-year-old with leukemia who wanted to play out a superhero fantasy, was a testament to the power of social media. Thousands of people, including President Barack Obama, joined the Make-A-Wish Foundation to ensure that Miles Scott’s big day would be unforgettable.

In a curious way, the attention lavished on Batkid also shows why the relentless political opposition to the Affordable Care Act -- powerfully aided by the incompetent federal exchange rollout -- will not derail the law.

The Make-A-Wish Foundation exists to take some of the sting out of gross unfairness. Batkid, whose leukemia is in remission, did nothing to deserve an awful disease, and the people of San Francisco -- and Twitterland -- can’t do much to protect him from it. But they went to extremes because they realized that he had drawn a short stick, and they wanted to add a measure of happiness to it.

Obamacare derives from similar motivations and likewise employs the power of large numbers to mitigate individual instances of misfortune. Right now, the focus of discontent with the law is less on a malfunctioning website than on relatively healthy and well-off consumers who face higher premiums because their old insurance policies fail to meet the law’s criteria. In effect, the outcry is over an injustice and the fear that more will suffer it.

When we strike at unfairness, we don't want collateral damage. (Some San Franciscans endured blocked traffic for Batkid's sake. Paying thousands in higher insurance premiums is a far stiffer penalty.) To improve the lot of tens of millions, including some who would be dropped by insurers for one bogus reason or another as soon as they or a family member became seriously ill, Obamacare does make things worse, at least in the short run, for a few million. Those who lose their policies in the individual market and have to pay higher premiums are generally too well-off to qualify for federal subsidies. They are not poor. That doesn’t mean they all can readily afford to pay more -- even for insurance policies that are superior to the ones they lost. But some can. And for most, their plight is not as severe as the far more numerous group that either can't afford insurance or can't obtain it because of bad luck.

Americans have been talking about collective action to protect the uninsured for many decades. The impetus isn't hard to understand: We are a rich nation that uses other government programs -- Social Security, Medicare, food stamps, unemployment insurance -- to cushion hardship. A communal sense of responsibility for the vulnerable has been buried in the backlash to Obamacare. But the compulsion to expend public resources to help uninsured people obtain health care will not die.

The conservative argument that private charity should supply what public commitment withholds worked fine for Batkid. For millions of uninsured, however, it is a nonstarter. Health care is too complex and expensive, and the needy population too great, to rely on private initiative. It’s hardly a fluke that four years after the Affordable Care Act was written there is still no Republican alternative to provide health insurance or care to millions without it.

Obamacare will survive its current crisis because it is the only vehicle for accomplishing a long-standing social goal. (The anxieties the law has unleashed merely confirm how important health security is to people.) In the unlikely event that the combination of hostility to the law and its own flaws bring it down, it will likely return in a more virulent strain.

San Francisco is a quintessentially liberal city. But the compassion its citizens showered on Batkid is not uniquely liberal. It's indicative of a nation that, for all the countervailing political winds and all the vested interests, cannot justify abandoning tens of millions of citizens to illness, insecurity and shoddy care. Given all the shouting, Americans may be tempted to heed conservatives and call the whole thing off. In the end, I'm betting they answer the bat call.

(Francis Wilkinson is a member of the Bloomberg View editorial board. Follow him on Twitter.)