Doing one good deed can make people feel free to act a little worse afterward
Moral licensing describes how a recent act of virtue can quietly loosen someone's ethical guardrails: in one study, people who'd just picked a woman or a Black candidate for a hypothetical job were then more likely to say a different, unrelated role suited a man or a white candidate better. Having 'proven' their good character to themselves, they felt licensed to indulge a bias they'd otherwise have suppressed — a close cousin of how people manage dissonance between actions and self-image.
— Wikipedia contributors, Self-Licensing — Social psychology