It does sound like the classic sunk cost fallacy. But it also implies that the would-be-fired person has become better after being "educated", and probably better than the average newly-hired person replacing them if they are fired...
When a generally smart person makes a humiliating million-dollar mistake, then you can trust that person, more than any of their coworkers, to never make that specific mistake again. That's the "expensive education" here.
Depending on the mistake it could also mean that they are more likely to make the same mistake. Especially after the memory of the event fades, they may regress to the old way they acted.
You may want to refresh yourself on the definition. Sunk cost is resources already spent, which cannot be recovered - the inability to recover it is what drives the reluctance in the case of the fallacy.