I think it largely comes down to a few factors: Amazon does a
lot of hiring, changing jobs is a hassle that many people won't do just because of momentum, and we naturally only hear about the very worst of what it's like to work at Amazon. If you keep hiring enough developers, enough of them will stick it out thanks to momentum (through possibly sub-optimal but not necessarily tortuous conditions) for long enough to have a large number of developers at any given time.
I worked at Amazon for ~5.5 years, and it was fine. I wasn't in bliss, but it wasn't awful, it was fine. I eventually left not because conditions worsened but because my team's responsibilities eventually shifted to work I disliked enough to overcome the momentum (web ads), and I found out they have a very generous severance program if you know what to ask about.