Firing people if you can't get backfill is illogical, obviously. Once a company institutes a hiring freeze, low performers get locked in until forced layoffs. You'll see some people stop working and start job searching because they know that any contribution they make at all is better for their manager than having them fired.
However, deliberately keeping low performers around as a buffer becomes a self-own on a longer time horizon. Smart managers will negotiate hiring exceptions to replace a low performer now rather than keep that headcount occupied for safety. Yes, it's frustrating to have to lay off a good performer, but it's more frustrating for everyone to have a poor performer dragging the team down for some invisible game of chess that goes on for potentially years without resolution.