Well morality is a higher state of consciousness. Primal urges are lower down the ladder but can overpower your moral bounds. Then you must either repent/restore balance, or adjust your moral standing to include the new action. A man beating his wife may find it to be wrong at first, but through rationalization (like: "they did it in the Bible, so I can too!") he may find it well within his moral bounds.
And just as Oldtrees, I think that there's always a reason for doing something which you may regard as wrong. Usually, it it because doing the other alternative/alternatives may seem even more wrong. (Thief example: Steal and gain money for drugs, or suffer the horrible, possibly fatal effects of doing a cold turkey).