Capital often gets misallocated during economic bubbles as the bubbles can mask the flaws in the underlying business models.
As a general rule, lending to entities that are using the loans to cover operating losses (particularly in times of economic uncertainty) doesn't workout.
You can't blame it all on the banks.