Twitter was losing $360 million per year before Musk. These layoffs were going to happen whether Musk bought the company, or not.
Their most profitable years would have been cancelled out by the new debt Musk brought, and that was before he tanked their ad sales.