I think the bullet that took the kill shot was the unions. Amazon refuses unionization.
One thing that is not well known is that the area of NYC where Amazon was going to locate (Long Island City) has been the subject of several major rezoning efforts by the New York City government over the last 2-3 decades.
(FULL DISCLOSURE: I have a professional familiarity with this from earlier in my career.)
The biggest factor in the local opposition to the Amazon project was the radical transformation that the area has seen since the early 2000s. Long Island City has historically been a light industrial hub in the city, and the NYC council took great care to protect the industrial character of the area as it went through several rounds of rezoning.
When the original rezoning was approved in 2001, they envisioned a core area of 5 million square feet of office space and 300 residential units in condo/apartment buildings. The rest of the area was to remain zoned for the light industrial businesses that have been there for decades.
With two major housing bubbles after 2001 and a major effort by the DeBlasio administration to develop affordable housing in NYC, the actual development that has occurred in Long Island City has been very different. Only about 30% of the projected office space was built, and instead of the original 300 housing units there have been more than 10,000 built in residential towers.
The Long Island City area can't handle 25,000 workers in new office buildings under the original zoning plan. If Amazon moved there, the neighborhood would be getting more than 5 million square feet of NEW office space ... on top of the 1.5 million already there ... on top of the 10,000+ residential units that were never envisioned when the area was rezoned. So everyone in the neighborhood around the original rezoning area knows that the small industrial and commercial buildings occupied by local businesses were going to be sold and demolished to make way for the new Amazon campus.