Crystal City signage stands in Arlington, Virginia Andrew Harrer | Bloomberg | Getty Images

A member of the team that led Amazon's search for the location of its new second headquarters says the company knew that it might encounter some local resistance to its plans to locate part of the project in Long Island City, Queens. But when that opposition proved to be more strident than expected, it helped Amazon resolve a dilemma it had been wrestling with for months: how to hire 50,000 tech workers all at once. "That was part of the original decision to split the second headquarters among New York and [Northern Virginia]," said Brian Huseman, Amazon's vice president for public policy. The response in Virginia was much different from New York's — what little opposition there is has been low key.

"We received a really warm welcome from the community," Huseman said. Rather than continuing to battle with New York, the company quickly decided to drop its plans to hire 25,000 people there. Instead, it would focus its efforts on Virginia. Huseman provided CNBC an exclusive, behind-the-scenes look at the year-long process of choosing a second headquarters, in an interview inside the temporary office space the company has leased in the Crystal City section of Arlington. The company still plans to limit its hiring in Virginia to 25,000 employees over 10 years. The other 25,000 that had been planned for New York will be spread among the company's 17 existing tech hubs — a more manageable process. "There's a lot of great tech talent around the country, and we have existing presence in many of those locations," Huseman said. Huseman also defended Amazon's selection process, which received criticism — especially in New York — for a lack of public engagement. Amazon required the 20 finalists for the project to sign non-disclosure agreements, and most of the state and local governments involved refused to disclose the details of their bids, citing competitive reasons.

Amazon CEO Jeff Bezos The Washington Post | Getty Images

"We were transparent from the very beginning," Huseman said. "Many economic development projects, the public never hears about them at all until after choices are made. We decided to make this public from the very beginning." Once they did, Huseman said company officials were genuinely surprised at the amount of attention the process received. "We knew that it is a huge economic development project. We knew that," Amazon's Huseman told CNBC. "But we were surprised by the number of locations that submitted bids for the process."

Game on

Amazon set off a massive bidding war with its announcement on Sept. 7, 2017, that it was seeking proposals for what it dubbed HQ2, a $5 billion project with 50,000 employees that would complement the company's existing headquarters in Seattle. The company received bids from 238 locations across North America. "We want to encourage you to think big and be creative," the company had said in its request for proposals. Many took the admonition about being creative to heart. An economic development organization in Tucson, Arizona, sent the company a 21-ft saguaro cactus — Huseman says the company had to find a cactus museum to donate it to. The city of Stonecrest, Georgia, offered to change its name to Amazon if it was chosen. To evaluate all the bids, Amazon assembled a small, core team led by Holly Sullivan, head of worldwide economic development. Bezos was also closely involved in the process. But Huseman insists Bezos' personal preferences — like the fact that he has a home in Washington, D.C., and owns the Washington Post, or that he grew up in Miami — were not factors in the decision-making. "That did not play a role. We did not come into this with any decisions made, contrary to what people have said throughout the process," Huseman said.

Brian Huseman, Amazon vice president of public policy Harriet Taylor | CNBC

Instead, he said, the team turned to something Amazon knows well: analyzing data. "We have lots of data — data from external sources, data that we had gathered and data from the responses that the locations gave to us," Huseman said. Among the external sources the team looked at, Huseman revealed, was CNBC's America's Top States for Business studies. The 2017 study ranked Washington as the top state, which was no help — the company already has a headquarters there. The 2018 rankings put Texas at No. 1, and Huseman confirms that they looked closely at Dallas and Austin. Both cities were among the 20 finalists for the project. The CNBC study and others included data about the criteria Amazon had deemed most important, including infrastructure, economy and, most important, workforce. "It turns out that tech talent was the biggest driving factor for us," Huseman said. "Both tech talent on day one, but also tech talent in the future."

The states strategize

While the Amazon team was crunching numbers in Seattle, eventually whittling the list down to 20 finalists in January of 2018, officials and business leaders in the finalist cities were scrambling to put their best foot forward for the company. Many had never put together a bid for a project anywhere near this size, and few if any had done it in as short a time frame as Amazon was demanding. Some states, most notably New Jersey and Maryland, offered multibillion-dollar incentive packages — $7 billion and $8.5 billion, respectively — in an apparent attempt to mask other issues. For example, Amazon said it wanted a "stable and business-friendly environment." New Jersey ranks No. 45 in the Business Friendliness category of this year's Top States study; Maryland is No. 31. Besides, Huseman said, contrary to speculation, it was never really about the money. "It's not just monetary incentives, but it's looking at the comprehensive environment to allow companies to flourish," he said.

That was a good thing for Virginia, which was not prepared to match the levels of incentives offered by New Jersey and Maryland. Virginia was offering only about $750 million. Instead, the Virginia Economic Development Partnership — the state economic development agency that coordinated the pitch — decided to emphasize the state's many workforce advantages. Virginia offers the best workforce in the nation, according to the CNBC 2019 America's Top States for Business study, with the nation's largest concentration of science, technology, engineering and math (STEM) employees. The state also ranks No. 1 for education, tied with Massachusetts.

It turns out that tech talent was the biggest driving factor for us. Both tech talent on day one, but also tech talent in the future. Brian Huseman Amazon vice president of public policy

The agency assembled a package of bids, which it says weighed 27 pounds, and shipped it off to Amazon. It included a range of locations, including Richmond, Hampton Roads and four potential locations in Northern Virginia, including Crystal City.

Reading the room

In Crystal City, Matthew Kelly, CEO of real estate investment trust JBG Smith, sensed a potential opportunity almost from the moment Amazon issued its request for proposals. The company owns 6.2 million square feet of office space in an area that once was dominated by defense contractors but now was around 20% vacant. Amazon represented a chance to jump start the company's plans to redevelop the area. "We believed we had a good shot because we offered a lot of the things they were looking for in terms of workforce, in terms of existing infrastructure, depth of labor pool, in terms of being on the east coast," Kelly told CNBC. But Amazon was playing its cards close to the vest. Plus, it was evaluating 20 bids from across the country—and Toronto, Canada—with a small team. The result was that all the bidders had limited time to pitch the company. "It really wasn't until we were about nine months into it that we started to spend a lot of time together. So along the way, our first meeting we had 45 minutes, our second meeting we had one day," Kelly said. At one of the meetings, Kelly brought the Amazon team to an upper floor of one of its vacant buildings in Crystal City with a view of Ronald Reagan Washington National Airport less than a mile away, and Washington, D.C., just beyond that. Access to transportation and a location in a large metro area were also on Amazon's list of priorities. On the floor was emblazoned a map of the site, allowing the team to visualize its potential new home.

An overview of Crystal City, where Amazon plans their 2nd headquarters, showing the Pentagon and Ronald Reagan Washington National Airport nearby. Google Earth

"We really tried to read the room and understand how do we position and tell the story about how great this location is about how great northern Virginia is," Kelly said. Crystal City and nearby Pentagon City—an area JBG Smith was already planning to rebrand as "National Landing"—seemed to tick a number of Amazon's boxes. Reagan National Airport is so close that the bid included a pedestrian walkway from Amazon's proposed headquarters directly to the terminal. There is also easy access to the DC Metro and the Virginia Rail Express commuter lines. And while Crystal City had seen better days, it still had the makings of a vibrant community, including plenty of shops, restaurants, and easy pedestrian access. "A lot of tech companies actually like to be in a campus away from urban areas because they value confidentiality and secrecy and they want to have their own space," Kelly said. "Amazon's a little different. They like to be enmeshed into an urban environment." But the deciding factor for Crystal city may well have been the bid's emphasis on education. It was apparently the only bid that included a college campus right next door — Virginia Tech University was offering to build a so-called "Innovation Campus" in nearby Alexandria. Amazon was pretty much sold. "Many locations had current tech talent," Huseman said. "What was unique about Virginia was its commitment to developing that long-term talent pipeline and closing the skills gap." But there was a last-minute snag.

Split decision

Amazon had slowly been coming to the realization that its initial hiring plans were too ambitious. "As we were looking through all the locations, we realized it was going to be hard to hire 50,000 tech employees in one location," Huseman said. The company had formulated its original request for proposals with the idea of replicating its Seattle headquarters, which houses around 48,000 people. But those numbers were built up over time. Huseman said it was not a question of whether 50,000 skilled workers could be found in any one city. Rather, it was whether Amazon could muster the resources to hire all of them, in the same place, at essentially the same time. So in September, one year into the selection process and only about three months ahead of Amazon's self-imposed deadline, the company decided to split up the project. With the clock ticking toward the year-end deadline, the team—including Bezos—gathered in a conference room at Amazon headquarters in Seattle to hash out the final decision. "This was an important decision, so many of the top leaders of the company were involved," Huseman said. "It was definitely a long, marathon meeting when we finally made the choice." In the end, Huseman said, it was still about the data. "At Amazon, when we make a decision, we always go through the pros of a decision and we go through the cons. And so, we went through the pros and cons of all the 20 finalist locations," he said. The final analysis brought them to Virginia and New York. The pros involved the things that Amazon was seeking from the outset, including the ability to attract and retain talent, and infrastructure. The cons primarily involved cost, and perhaps some potential political hurdles in New York.

New York's city council holds its second hearing questioning the city and state's deal that gave Amazon three billion dollars to move a second headquarters to Long Island City in Queens. City council members criticized Amazon for its anti-union policies and its alleged cooperation with immigration authorities. Andrew Lichtenstein | Corbis News | Getty Images

Finally, it was decision time: 25,000 employees would go to National Landing, and 25,000 would go to the Long Island City neighborhood of Queens, New York. The group had also been impressed with Nashville, Tennessee, because of its low costs and great quality of life, so they decided to add a 5,000-employee operations center there. Long Island City was a bit of a risky choice. Like Crystal City, it has easy access to transportation and a great workforce—New York finishes in the top ten for Education, and No. 4 for Technology and Innovation. Plus, locating outside of Manhattan gave the company a foothold in a great city, but room to spread out. It did not hurt that New York was offering around $3 billion in state and local incentives. But New York was also not known for the "stable and business friendly environment" Amazon was seeking. The state finishes No. 49 in the Business Friendliness category of America's Top States for Business. The libertarian Cato Institute calls New York "the least free state in the country," criticizing the state's heavy regulations, New York City's rent control laws, and the level of government spending. Still, the pros outweighed the cons. On Nov. 13, one week after the midterm elections, Amazon announced its decision. Immediately, some cried foul. After more than a year of stringing the country along, the company was going with two of the largest, most expensive metro areas, and collecting around $4 billion in incentives. Was the fix in all along? Huseman says no. "This was a really open process. We had no idea where it was going to end up or where we were going to choose," he said. "We looked a lot at the data throughout this at the end of the day."

Not so fast

New York would throw Amazon one last curve ball. "We knew New York would be tough," Huseman said. But they did not realize how tough. A wave of opposition—emboldened by the midterm election results and led by newly elected Congresswoman Alexandria Ocasio-Cortez—railed against the incentive package, and Amazon's potential impact on the community.

A protest message directed at Amazon is spray painted on a wall near a construction site January 9, 2019 in the Long Island City neighborhood of the Queens borough of New York City. Drew Angerer | Getty Images