Thousands of employees affected as the tech giant shifts focus to artificial intelligence, cost-cutting, and data center investments.