AI is definitely a solid reason. Even a 10% increase in developer efficiency translates to roughly 9% fewer workers needed to do the same job. For AI to be cost effective, it must reduce headcount.
Amazon is mostly laying off managers, however, not developers.
Jevon's Paradox will show up too though. When employees get more efficient companies just demand more of them.
You really have to be in "the room where it happens" to know the motivations behind any one layoff.