A resignation lands, and the instinct is to counter. Match the number, sometimes beat it, keep the disruption from happening. It often works, in the sense that the person stays.
What the data inside most organisations actually shows is that the majority of employees who accept a counter-offer leave within twelve months anyway. The resignation was rarely about the number in the first place. It was the number that finally made the real issue impossible to ignore.
A counter-offer treats the symptom. Before extending one, it's worth asking whether the same conversation should have happened four months earlier, for free.