Although economic factors are the main reason for tech layoffs, firms are also shifting resources to focus on AI talent.