It is entirely possible, but speculative, that the jobs Amazon was promising would bring in more revenue than the tax breaks, but that was of little import to the right-now impacts it would have on the community.
All Bezos had to do was sweeten the pot a little more, give some hope to the folks who would be toiling away endless hours for crap wages.
Had he been a bit more willing in that regard, he probably would have won.
Of course people wanted Amazon's HQ, but in the long term, they also want a future. And if that future turns out dismal, it's the pols they will blame.