A moral hazard exists when it is prohibitively costly for a principal (such as a law department lawyer) to directly monitor the efforts of an agent (such as the law firm partner who has been hired for a matter).
It is manifestly difficult for the in-houser to observe – let alone direct – how much time the partner spends on the matter, how skillful the performance, and how intense the effort. Opportunities for malingering, inefficiency and opacity lurk everywhere. To pay the partner by the hour exacerbates the moral hazard.
Please note: I believe that nearly all lawyers retained by law departments are highly ethical and both work and bill to the best of their abilities on behalf of their clients. Still, out of the imbalance of knowledge lurks moral hazard. This risk, inherent wherever the interests and knowledge of service providers and purchasers diverge creates several related issues (See my post of Dec. 23, 2005 on information asymmetry; Jan.16, 2006 on the principal-agent problem; and May 1, 2005on the dark side of partnering.). To be sure, moral hazard lurks in many places other than the example given.