You should have been straightforward and told them to go fuck themselves. Laying people off by a brief call is for cowards.
Most programming jobs are remote. What's the alternative, exactly?
Where is this true?
Maybe in 2021...
These middle managers are robots in an organization. You knew they saw you as "resources", now they can't afford you and have to put you back in the pool. So be it.
If they'd been shitty about it, sure. But if you got paid for your time - fair trade.