I've seen this happen at almost every job I've had: Senior engineer with 10+ years experience works 40-50 hours a week and gets laid off. Senior engineer is opinionated about how things are implemented and can come across as "difficult." Two junior engineers are hired for about the same cost and are pushed to 60+ hours a week. They'll do literally anything you tell them to. Non-engineer management sees a win but then eventually gets mad about codebase issues like it's unrelated, and end up churning through juniors trying to fix it.
Another alternative is outsourcing of course, in which you can end up with a small team for the short-term cost of one senior engineer... and a lot of the same problems with the junior route.
It feels like one of those risk problems where people are happy about the short-term gain but fail to look far enough ahead to see the long-term issues.