But over time, Amazon’s patience wore thin. Executives were reportedly livid at the nomination of the Queens state Senator Michael N. Gianaris, an outspoken opponent of the deal, to a Public Authorities Control Board that would give him power to “effectively kill the project.” Amazon leaders were grilled at a February city council meeting about the company’s resistance toward unions and the working conditions of its fulfillment centers. (By contrast, Virginia—the other winner of the HQ2 sweepstakes—has embraced Amazon with open arms, and the state has already authorized $750 million in state subsidies for its Crystal City headquarters.) Last week, The Washington Post (which is owned by the Amazon CEO, Jeff Bezos) reported that the retailer was having second thoughts about its New York campus, given the level of opposition from local politicians, advocacy groups, and the media.

Within a week, the company officially canceled the project.

The company said it does not plan to reopen the HQ2 search. “We will proceed as planned in Northern Virginia and Nashville,” the statement said.

The most obvious losers in Amazon’s reversal are real-estate speculators. In November, The Wall Street Journal reported that brokers embarked on a “condo gold rush” in anticipation of the Queens campus construction. “This is like a gift from the gods for the Long Island City condo market,” one realtor told the Journal. Alas, the gods, like the billionaires, giveth and taketh away.

Annie Lowrey: Amazon was never going to choose Detroit

But it is not clear that either New York City or Amazon will suffer with this announcement. In fact, it is more likely that neither the city’s nor the company’s economic trajectory will be materially altered. New York City doesn’t need an Amazon headquarters to be the global capital of advertising and retail, and Amazon doesn’t need New York subsidies to expand its footprint in the city.

The larger truth is that corporate subsidies, including the $3 billion package offered to Amazon, are often pernicious and usually pointless. Studies show that these sorts of measures “have no discernible impact on firm expansion, measured by job creation.” Yet every year, local governments spend more than $90 billion to move headquarters and factories between states, a wasteful zero-sum exercise whose cost is more than the federal government spends on affordable housing, education, or infrastructure. In the most garish example of corporate-welfare absurdity, Foxconn, the Taiwanese manufacturing company, solicited up to $4 billion in subsidies from Wisconsin in exchange for a factory and tens of thousands of workers. Now it’s an open question whether that facility will ever get built.

But even the less garish examples are galling. New York City doesn’t have an employment problem; it has a housing-affordability problem. Yet the original language of the Amazon deal used tax breaks that might have gone to infrastructure or low-income housing investment in the Long Island City region. While it’s hard to draw a direct line between corporate handouts and foregone public spending, the fact that states and cities cannot run persistent deficits or print their own currency, like the federal government can, implies that tax dollars lavished on corporations limit the amount of money available to other public projects. Meanwhile, the New York City subway is a disaster, and tuition is rising at the City University of New York system.

“I am a bit surprised that Amazon pulled out,” Aaron Renn, a senior fellow at the Manhattan Institute, told me by email. “The unrest over inequality and gentrification is starting to have tangible business consequences.” The irony is that the quasi-socialist revolution behind this unrest has voided a corporate-welfare deal that is more corporate cronyism than capitalism. It has taken far-left protesters to inject a measure of sanity into the free market.