Robust public transportation infrastructure proved key to making the first, top-20 cut in the red-hot competition to host Amazon's second headquarters, according to a study of the company's search.

What happened: Cities like Detroit and Phoenix, which were widely expected to be short-listed, were hurt by their lack of public transportation and high congestion, says Jason Horwitz of Anderson Economic Group, a consulting firm.

Horwitz is basing his conclusions on the Amazon HQ2 Index, a gauge he constructed to rank cities according to 11 metrics corresponding to what Amazon said it's looking for. Nine of his top 10 cities made the top-20 shortlist.

Public transportation is key: During Amazon's early days in the mid-1990s, founder Jeff Bezos refused to subsidize employee bus passes. "He wanted them to have their cars there so there was never any pressure to go home," Amazon's sixth employee, Nicholas Lovejoy, told Brad Stone, author of "The Everything Store," a profile of the e-retailer.

But Bezos has apparently has come around to buses and subways, now that he counts on them to convey many of his tens of thousands of employees to work on a dense, urban campus.

According to Horwitz, high-profile metro areas absent from the shortlist, like Detroit and Phoenix, fared particularly poorly on his ease of transportation index, coming 29th and 32nd out of 35 metro areas he studied.

Detroit was in the top 10 in metro areas with the lowest cost of doing business, and in the top 20 for access to qualified workers and essential business services, suggesting that transportation hobbled the Motor City. "The don't even have a regional rail system at this stage," Horwitz said.

Surprise additions: Horwitz did not include Pittsburgh, Pennsylvania or Columbus, Ohio, in his list of likely site locations, because their airports lacked direct flights to Seattle, San Francisco and Washington D.C. (He suspects that, as part of their proposals, these cities promised to secure such flights.)

The bottom line: Corporate America is fleeing the suburbs for dense, urban campuses where robust public transportation is often necessary for workers to maintain a high quality of life. And Amazon's snub of Detroit and Phoenix are another sign of the growing importance of such infrastructure.

Clarification: The headline of this article initially stated that Amazon discriminated against cities without "subways," when in fact the company is biased towards cities with strong public transportation networks, whatever the form.