The banks should require sufficient collateral for those loans, so if the loans are bad they can clawback some capital.

If the bank didn't properly collateralize the loan, then the banks shareholders should take the hit.