It seems to me that there is a clear explanation: violating the natural law instilled in us by God puts man in conflict with himself. That kind of cognitive dissonance means a man either has to change his behavior or his beliefs. The man in a sinful situation, who knows it's wrong, will either give up his sin or alter his beliefs to justify his behavior. Have you ever heard someone in a sinful situation, e.g., adultery, say, "I just don't know what to believe any more?" There's a perfect example. If I want to commit this sin that feels so good and makes me "happy" (at least in the short term), then I will likely throw out my former belief in fidelity and the sacredness of my vows and make up any excuse to justify myself. Tolstoy illustrated the truth of this in Anna Karenina.
But then again, God has a way of taking people in their darkest moments and shining a shaft of white light that cuts through the darkness of sin and invites conversion. So pray for sinners in the mire of cognitive dissonance that they will see the truth and turn back to our Creator who loves them enough to shed every drop of blood for them.
