It's rarely that black and white.
Sure, there are things we know we should do - whether because of familial duties, social duties, or as in this case, our belief system, or our religion/creed.
Then there are the things we want to do.
Sure, we may know they're wrong, or know we'll regret them afterwards - but that's not to say we weren't tempted.
And the human mind is wonderful at trying to justify doing "bad" things (where bad is whatever your own faith/belief system is). So I may be like, I'm a awesome Christian, I'm going to attend bible college, then when I get there, I hear a sermon that strikes a nerve and reveals some sin that I'm committing - I may try to justify myself, by saying, well, that doesn't really apply to me because of XYZ, or I may be like, that lecturer has it out for me, why is he targetting me when there's so many other sinners, I'm going to have a word with him! etc.