How can "we don't have the money to pay you" not be a justified reason?
No idea about this case. But often it seems they're cutting cost because they think they can, not because they have to.
But if the company is shutting down a whole team without replacement, the employees should still get the option to relocate into another role. They can be let go only after that fails.