i'm not convinced that "i'm a bad person but at least i'm honest about it" is a virtuous mental move because we tend to choose actions that conform with our self perception. if one doesn't behave in alignment with one's beliefs in a particular situation, denial and "it was a special case because <X>” at least preserve the general self narrative "i am a good person" - which i'd guess leads to more good behavior than shifting to "oh, i did something evil, i notice i did so, i don't regret my choice, i am an evil person"