The layoffs being "due to AI" is usually about freeing up the budget to build a couple datacenters and buy GPUs. And they have to layoff 14% of their workforce because they are buying those GPUs at many times the normal price thanks to the zeitgeist.
They aren't saying that they don't know what to do with the AI productivity boost, but rather they think it worth taking a huge productivity hit right now so they can invest in the future. Whether their vision of the future is realistic...