HL Mencken noted that 'for every human problem there is a neat simple solution and it is always wrong'. Such simple solutions includes the idea that 'moral hazard' by bank executives largely contributed to the 2008 financial crisis. The examples given are always INVESTMENT bankers, who make great bonuses when they do deals, and then leave large liabilities that are toxic. Also, one can point to rich guys like Bear Stearns CEO Jimmy Cayne, who lost over one billion dollars but still walked away rich, worth over $500MM. It was heads they win, tails taxpayers lose, a game maximized at infinite variance.
This narrative is pretty ubiquitous, so I'll give just two references: Russ Roberts in his paper "Gambling with Other People's Money: How Perverted Incentives Caused the Financial Crisis" (.pdf) (he podcasts on it here), or Barry Ritholtz's book Bailout Nation.
While anticipated financial bailouts do not increase lending prudence, I don't think they were very significant in the creation of the housing bubble. The 2008 crisis hit all banks, not just investment banks. Most non-investment bankers get much more modest salaries and bonuses, often largely in at-the-money options in their firm's stock, with 5 to 10 year horizons. So, looking at the accompanying chart, which shows the KBW Bank Index since 1994, we see that since 1998, bank stocks were pretty flat, with a slight 25% bump around 2006, but the index now is still below its 1997 level. When I left KeyCorp (NYSE:KEY) in 1999 I had a bunch of options priced around $25-30, and as I left I had to exercise them. Who knew that if I had stayed, those options would be worthless, as the stock now trades around $8, light-years away from being in-the-money. Most of my retirement savings would have been erased with the 2008 crisis had I remained there (and I'd be living in Cleveland--a twofer).
This crash has been incredibly painful for your average bank decision maker. The Jimmy Caynes and Jamie Dimons may be rich, devious, and reckless, but it's naive to anthropomorphize banks via their titular leaders. As Bob Rubin, the erstwhile financial genius demonstrated when he said he knew nothing about Citibank's (NYSE:C) exposure to mortgages, these signature guys aren't too involved in the nuts and bolts of their ALCO meetings.
Your average bank decision-maker thought that lending to people with little income to buy houses was not that risky. Why this was so is interesting and complex, but I don't think it was as calculated as merely, 'well, I'll get rich lending the money, but won't lose much when it all goes downhill', because your average bank executive, at say Washington Mutual, Wachovia, or KeyCorp, just lost most of their retirement savings, and they won't be getting a do-over.