During the financial crisis of 2007 -2009, the Federal Reserve used its emergency authority to lend to shadow banks. Explains hoe this extension of the lender of last resort function added to moral hazard.
The solution to the problem created by the government acting as a lender of last resort is not that the government not play this role but that the government demand greater transparency. Information about the investments made by the banks and the level of risks being taken should be available for everyone to see. There should also be a more active participation by the government to ensure that excessive risks are not allowed.
The answer to this question lies in the way that this action would have been perceived by the shadow banks. They, having engaged in risky banking practices themselves, now are bailed out by the government so they don't feel they have to face the consequences of their actions. As a result, one could argue that you are creating a situation which encourages risky lending, as such banks will believe they can continue acting in such a way.
Shadow banks are not subject to the same regulation or capital requirements as more traditional financial instruments, and can therefore leverage more, and therefore risk more. By lending to these institutions, including hedge funds, the Fed took on more moral hazard, which the federal government tried to minimize through expanded regulatory legislation in 2010. As others have said, with over 50 trillion dollars tied up in shadow banking, it is difficult to imagine another option.
I agree that lending to shadow banks -- which are not only less regulated but also also less understood -- enhanced moral hazard. Unfortunately, those banks had become so important to the economy by 2007-2008 that there were substantial risks to the economy as a whole in not trying to help them.
The Federal reserve essentially rewarded banks for taking risks and being incompetent. They also set a very bad example for the future. Will there be further bailouts? Investors thinks so, as well as banks. So, nothing has changed. In fact, things have gotten worse, because banks are now bigger, which means the problem in the future will be worse!
When the government lent money (or was in the position of being willing to lend) to the shadow banks, it encouraged them to make risky investments. Shadow banks already tend to have riskier investments than regular banks. Having the Fed there to back them up made this more likely, thus increasing the moral hazard.