Because most investors are investing in more than one company. If someone has a stake in Google, Microsoft, and Confluent, and their ROI for the first two are great this quarter, but Confluent is lukewarm or even in the red, they're going to want an explanation.
They can be told that products are great, or employees are producing a lot, but the only thing that matters to investors is the money. And so, when you're underperforming compared to others in your market, you have to do what appeases the shareholders, and that involves culling employees.
I have no unique insight into their perspective but if I had to guess they're starting to worry about the lack of easy money and want a signal that management is going to play it safe with their current cash reserves instead of banking on another infusion. They probably could, you know, tell them as much, but sacrificing your employees really adds oomph to your commitment.
If you hired employees to do something and they're making you money hand over fist, you don't fire them. They're not an expense. They're a profit center.