The issue is that it becomes necessary as marginalized candidates are given preferences during the hiring phase. So if the same privilege is not extended during layoffs it will unfairly impact them.
It is brutally unfair to hire by one standard and then suddenly hold them to a higher one. And fairness aside, if you do not look through an anti-racist/anti-oppression lens you would destroy years of work of improving company diversity.
Does this imply that you think that minority candidates that were hired were not as qualified as non-minority candidates? That's the only way I can parse your statement that these affirmative action hires were hired by one standard and then held to a higher standard when fired.
To be marginalized is to be cheaper. All else equal, the cheaper worker will be given preference during hiring. So long as the worker remains cheaper, all else equal, the cheaper worker will also be given preference during layoffs. If the worker works their way up into a position that they are no longer cheaper, they won't be given preference, but they also aren't marginalized anymore so you would't expect preference.
By unfairly you mean fairly.