Amazon needs a lot of software engineers and needs them more than any individual SWE needs Amazon, no matter what their market cap is.
Which is the whole point of unionizing.
As an aside, I sometimes wonder if they could literally have qualified as a not for profit whose sole goal is to grow into new market segments and employ more people. Because if you take a wide angle view of it, that's pretty much all they ever do.
That's true if you only consider a few carefully-chosen tech corridors like SV and sorta-Seattle. Software developer wages in much of the US, Europe, and most of the rest of the world, are not that great. Usually enough to live off of, yes, but no where near what we in the bay area and a few other select locations are used to.
High wages without a union only come out of an even larger pool of profit for them to pay wages from.