It is quite possible that the people they are firing aren't the ones they recently hired, but instead people who have been there for a long time but aren't meaningfully contributing anymore.
Many managers get promotions for how much the people under them accomplish. There is some adjustment to headcount, but the more you can get hired under you, the higher you can get promoted.