You might be a proud and valuable person in your personal life. But for a company, you are just an asset - low yielding asset with high depreciation.
So it is rational decision for an enterprise to let you go and free some liquidity that could be deployed elsewhere. Even buying Treasury bill yields more then an employee and is more liquid option. Liquidity is important when times get tough and recession is coming..
Just face it.
And for an enterprise if competitors are letting go employees it means that they are building their war chest of liquid assets. So you have too because you have to be prepared when time comes for mergers, takeover and acquisitions....