The area around Skyland Shopping Center in Southeast Washington, where a Walmart was planned. (Dayna Smith/for The Washington Post)

WALMART’S DECISION to abandon plans for two additional stores in the District has caused a lot of finger-pointing. Critics say, variously, that the mega-retailer pulled a bait-and-switch by walking away from its promise to serve poorer areas of the city; that Mayor Muriel E. Bowser (D) dropped the ball; or that the administration of the District’s previous mayor, Vincent C. Gray (D), should have secured an ironclad agreement that would have prevented the company from pulling the plug. Reality, though, is more complicated, something city officials need to realize if they ever hope to attract businesses to underserved parts of the city.

The announcement that Walmart was pulling out of projects at Skyland Town Center on Alabama Avenue and Capitol Gateway Marketplace on East Capitol Street caught city officials by surprise. Ms. Bowser characterized herself as “blood mad” over the decision. That is understandable, given the need for jobs, goods and services in long-neglected neighborhoods east of the river. The city worked hard to clear the way for the projects, including at Skyland acquiring the land and agreeing in the fall to buy out a covenant that might have barred operation of a grocery store. Millions of city dollars were involved.

Nonetheless, it is hard to credit the theory that Walmart never intended to build the two Ward 7 stores — that it held out the promise of those stores as a way to be able to build facilities at three other, more desirable locations. The Ward 7 decision was part of a larger retrenchment: The retail chain simultaneously announced the closing of more than 150 other locations and layoffs of thousands of employees. The fact that it had signed leases for both Ward 7 properties that it will now have to negotiate to be released from suggests the company was serious about its plans. Company officials contend that the order in which the stores were built was dictated by which sites were ready for construction.

Moreover, the three stores now operating created 600 construction jobs, more than 1,000 retail jobs and $15 million in new tax revenue. It is shortsighted to suggest that the city would have been better off without them.

City officials are exploring whether they have legal recourse against Walmart. Good luck with that. It might be more fruitful for them to do some soul-searching about whether they have undermined their own efforts to attract business development. Why have the three Walmart stores underperformed? Has the District created an unstable business environment in which employee pay, benefits and work conditions are decided by popular whim, with little regard for the realities of the business world? Instead of being outraged or trying to affix blame, city officials need to look ahead to determine what steps need to be taken to get development back on track, especially for neighborhoods most in need.