An eternal question: why do people who not only should know better but who have exemplary professional records and to all appearances are morally upstanding in other aspects of their lives sometimes commit appalling ethical breaches? A couple of recurring answers are depression and substance abuse, problems for which the State Bar provides help -- the Lawyers and Judges Assistance Program. But that explanation doesn't hold for all ethical lapses.
Behavioral Legal Ethics, a paper to be published in the Arizona State Law Journal, applies insights from psychology to the discussion of legal ethics lapses, and points to this observation from John M. Darley, The Cognitive and Social Psychology of Contagious Organizational Corruption, 70 BROOK. L. REV. 1177, 1180 (2005):
In our conventional way of thinking about ourselves, we are confident that we would know in advance that to do some set of actions would be morally wrong, and that this realization, occurring prior to the actions, would prevent us from taking them. These comforting thoughts turn out to be not true.
Key points: we don't think we're capable of acting unethically, we don't see the ethical dimensions of a challenge when we're grappling with it, we fail to understand how emotions will drive our conduct, we make small ethical lapses that lead to bigger ones, and we use post-hoc moral reasoning to justify questionable decisions. And as if that's not scary enough, the paper says that studies have found that you're likelier to lie if you're under time pressure and to make unethical decisions when you're suffering from a lack of sleep.