Amazon chief executive Jeffrey P. Bezos tours the facility at the grand opening of the Amazon Spheres in Seattle in January. (Jason Redmond/AFP/Getty Images)

Amazon’s handling of its HQ2 decision reminds me of nothing so much as LeBron James’s ill-fated television special, “The Decision.”

Perhaps you remember that 2010 episode, during which the greatest basketball player on the planet teamed up with ESPN and broadcaster Jim Gray to announce live his free-agency choice in front of not only millions watching at home but also a live studio audience made up of members of a Boys and Girls Club. Members who audibly gasped when James said he was abandoning him hometown team to join up with Dwyane Wade and Pat Riley of the Miami Heat — that he was “going to take his talents to South Beach,” as he infamously put it.

It didn’t matter that the show raised money for charity or that there was legitimate public interest in his choice: The whole spectacle was grotesque, a celebration of a millionaire devastating an already-devastated town by announcing he was abandoning it to pursue his dreams elsewhere.

Amazon’s decision-making process with regard to the placement of its second headquarters has taken place in a similarly public way, with the online giant soliciting bids from cities across the country, narrowing down the list of potential winners as time progressed, and finally, in a shocking twist worthy of reality TV, choosing two sites rather than one. (Amazon’s chief executive, Jeffrey P. Bezos, owns The Washington Post.)

The two chosen cities, it should be noted, are already considered winners in the global economy, two sites that need the influx of traffic and the increase in home prices less than anywhere outside of San Francisco, two sites filled with people ready to vent their annoyance about the imposition on their hometowns and the depletion of public coffers to bring jobs to their respective regions.

The promise of the HQ2 search all along had been the idea that Amazon might settle down in a city that hadn’t quite kept pace with the Acela Corridor and Silicon Valley during our latest e-boom. Columbus, Indianapolis, Nashville, Dallas, even Newark or Denver: These were cities that could have used an influx of high-paying jobs. The idea was bold and grand, a promise to spread the wealth in a country staring down increases in inequality tied as much to geography as anything else.

The promise went unfulfilled, of course, and the decision to split the headquarters in twain — with both halves going to the haves rather than one going to a have and another a have-not — was, simply, a PR disaster. Someone somewhere overestimated how much the public would enjoy seeing a megacorporation extract financial concessions from localities in an effort to boost the bottom line, all while dashing the hopes of smaller cities that never truly stood a chance at landing the offices.

No blunder lasts forever, of course. Following the debacle that was “The Decision,” James redoubled his charitable efforts. The LeBron James Family Foundation has positively intervened in the lives of hundreds of students. In 2015, James teamed up with the University of Akron to start a program that would pay for four-year rides for as many as 2,300 students, a financial commitment that could clock in at nine figures. James also ended up returning to Cleveland, delivering a championship to the city that had been title-less for more than half a century before the Cavaliers managed to win a title in 2016. Winning covers up for many mistakes.

Similarly, people will forget about Amazon’s missteps here. It’s hard to hold a grudge when the prices are so good, the shipping is so quick, and the shopping is so convenient. But the corporation could learn a lesson or two from James’s good works: Perhaps Whole Foods stores in finalist cities that weren’t chosen could double as food banks for the needy, or opportunity centers could be established to retrain workers struggling to survive in a rapidly changing economy.

Or maybe Amazon could use its lobbying powers to ensure that nothing like HQ2 ever happens again: There’s a growing consensus on the left and right alike that such corporate handouts are little more than cronyism designed to turn our cities against each other in a fight for business scraps. While lobbying in favor of a federal law designed to ban such practices would undoubtedly come in for criticism as self-serving — Amazon got theirs, now they want to stop everyone else from benefiting — it would equally undoubtedly be a massive public good. Imagine how much goodwill the company could generate by championing legislation that would end sports teams holding cities hostage for new stadiums, laws that would stop corporate behemoths from extracting billions in concessions from struggling local economies.

Like “The Decision,” the HQ2 mess will leave a bad taste in the public’s collective mouth for some time. How long that aftertaste remains is entirely up to the retailer.