Companies tie AI to layoffs, but the reality is more complicated