If your company actually became vastly more productive, because of "AI" or whatever, you wouldn't lay off people: you would take on new efforts, make higher profits, have more things going on.
Layoffs are always - always - a sign of bad decisions, misallocation of priorities. Gross mismanagement. Always.