Bit of both I think.
VC is becoming harder to get, especially at the same valuation as before. What you never want as a founder, that the valuation drops. Therefore, these companies try to make the current batch of money last longer. Secondly, most don't have the revenue to support even a quarter of their headcount. In the end, it's all about increasing the financial runway.
Twitter still works fine, technically, but a lot of the fired people were content moderators and so on. They don't contribute to running twitter's tech but they are important to not have it become an even worse shithole than it already was.