Note that this is a leveraged buyout, where Twitter has taken on $13,000,000,000 in debt to support the buyout. A lot of this debt (at least $3 Billion) is unsecured-loans expected to be rated CCC or worse... a rating that yields 16% APY.
Overall, the debt is estimated to cost 10% and getting worse (as interest rates rise), suggesting a ~$1.3 Billion/year hole in Twitters finances right now.
---------
For better or worse, Elon Musk's only sane financial option is to fire huge swaths of the company. He's gotta find $1.3 Billion/year in costs and fix that. Firing thousands of engineers will get him... partially there.
Of course, Elon should have been trying to grow the company, but that seems a lot harder than just firing a ton of people.
I'm sure Elon is also a vindictive asshole, so he also probably wants to get back at the team who brought up Twitter's arguments for mDAU numbers in court. It doesn't matter if the team was right or wrong, they were against Elon and therefore are to be terminated. IMO anyway, that's my read on his psyche right now.
The fact that Elon can also "rationalize" it as a good business move is icing on the cake. He's really gotta cut costs to have any hopes of making this work.