The now-demolished White Flint shopping mall in Bethesda. (Bill O'Leary/The Washington Post)

Maryland’s legislature recently approved $8.5 billion in tax incentives, the largest economic development package in the state’s history, to lure Amazon to open its second headquarters at a former shopping mall in Montgomery County — a location, ironically, just obliterated by online retail.

Maryland has company; state governments have oscillated from the extreme to the obscene in the “HQ2” sweepstakes. Illinois, the most insolvent state in the union, offered to funnel worker income taxes back to Amazon; New Jersey proposed a whopping $7 billion in assorted tax credits. As Amazon’s real estate team descends on the 20 contestants selected for further inspection, expect subsidy packages to grow in the form of land write-offs and property-tax-abatement schemes from tax-increment financing to payments in lieu of taxes.

HQ2 would seem like a unique opportunity for cities: hosting one of the largest retailers in the United States with a stock value of more than half a trillion dollars. Amazon recently purchased Whole Foods and is rapidly expanding into brick-and-mortar stores and across the tech and retail sector. The company’s ambitions are all-encompassing. As it said at launch, in 1995: “Our vision is to be the Earth’s most customer-centric company; to build a place where people can come to find and discover anything they might want to buy online.” Amazon aims to dominate the world’s economic activity, from food consumption to ride-hailing. Chief Executive Jeffrey P. Bezos, who owns The Post, is already worth more than $100 billion.

Direct benefits of the new headquarters will include 50,000 employees, construction and/or occupancy of up to 8 million square feet of space, a collection of restaurants and cafes, and many thousands of annual hotel visits.

All this and the winning jurisdiction still won’t get what it paid for.

How do we know? Fill a large jar with coins and auction that jar to a group of your co-workers. The larger the jar and the larger the group, the better. You very likely will obtain the following result: The winning bid will exceed the value of the coins. This anomaly is known as the “winner’s curse.”

A deep literature in behavioral economics, including work by Richard Thaler, last year’s Nobel winner in economic sciences, has demonstrated that when there are many bidders in an auction (more than 200 jurisdictions responded to Amazon’s proposal) and some are irrational (if state subsidies aren’t evidence enough, Tucson sent Bezos a cactus), the “winner” often pays more than the prize is worth. This anomaly is commonplace; the curse is seen in initial public offerings, spectrum auctions, government oil leases and even baseball free agency.

In the case of HQ2, each city will estimate the value of having Amazon — an estimate that can be thought of as made up of the true value plus any error made in estimation. Much like with the jar of coins, the “winner” is determined by whichever bidder makes the biggest estimation error (i.e., the biggest mistake). And the scale of this mistake grows as politicians get caught up in their own exuberance and overbid for emotional reasons, or because they want to take credit for winning the auction before the bill, including increased commute times and unaffordable housing, comes due.

In brief, HQ2 is a lemon in the making, and a very sour one given the number of bidders.

So how can we save cities from the curse?

Mayors could agree not to offer incentives above a certain threshold. History suggests this is unlikely. In the early 1990s, the New York tri-state region agreed to stop competing for business. New Jersey quickly reneged on the deal, and the region has continued to overpay for major corporations since.

That leaves two options. First, city and county councils should curtail overbidding by their mayors, county executives and economic-development agencies. They can pass legislation that mandates additional public hearings and ties community benefits agreements to subsidies and bond issuances for large economic development projects such as HQ2.

But a better alternative is for the federal government to leverage HQ2 to finally limit economic development wars. Congress, under the sweeping authority of the Constitution’s commerce clause, should pass legislation that taxes Amazon for direct benefits of any local subsidy, withdraws federal funding from states that offer welfare for HQ2 and denies tax-exempt status on debt offered to any corporate headquarters. The latter could follow a 2017 proposal by House Republicans to eliminate tax-exempt bonds for professional sports stadiums.

Public auctions may be the future of corporate expansion and municipal competition. Congress must act swiftly to protect our wallets, our cities and our country from the winner’s curse.