What is moral hazard?
When a banker decides to lend money, he does not always know how the money will be used, but he will set an interest rate. The client is often the only one who knows how this money will be used, but having obtained a fixed rate with repayments fixed to start 2 years later, he is not concerned that the banker will ask him to give an explanation. Further imagine a customer addicted to gambling, with little in the way of savings. This customer loses all the money at the casino and is completely ruined, the banker may never be reimbursed and may have to relinquish his claim on the debt.
Such a situation, where the customer has more information than the banker, and where nobody is encouraged to be prudent with their savings is called "moral hazard". The customer knows that he has no money to gamble, then he borrows to gamble everything on a winner-takes-all. At worst, he will still be poor and it is not his money that he has lost.
This procedure is the same for companies, if they know that the risk they take is borne by a third party, they tend to take more than usual.
Let us take the example of a large oil company, such as BP or Total. Let us imagine that the company goes bankrupt for X reason. The managers are, either way, almost certain that the State cannot afford to lose the company and will inevitably come to the its aid. Such a situation may encourage some major companies to take huge risks, like banks for example.
Quote on moral hazard
“… too-big-to-fail generates a severe moral hazard. If creditors believe that an institution will not be allowed to fail, they will not demand as much compensation for risks as they otherwise would, thus weakening market discipline; nor will they invest as many resources in monitoring the firm's risk-taking. As a result, too-big-to-fail firms will tend to take more risk than desirable, in the expectation that they will receive assistance if their bets go bad.”