Amazon is uniquely ruthless towards their engineers. There is a philosophy among the company's leaders that if a department as a whole is not doing well, all the people who are a part of it are to blame.
Its usually leadership who are the problem if a whole department is failing. If they started firing from the top down they'd eventually reach competent people who stayed with the department out of loyalty or because they felt responsibile to hold things together. Seems such a waste to fire those people too.
Unfortunately most companies don't operate as a meritocracy. Leadership is almost never fired because it becomes a club/brotherhood. The first people who are fired when things go badly are those not in the club (individual contributors).
There are always exceptions, but they are rare. People are innately tribal and political.