I'd put the blame all at the feet of whoever it was who let the banks issue those loans, and yeah also at the feet of people who bought houses they couldn't afford.
The banks have to make as much as possible, they have a fiduciary duty to their shareholders, that's capitalism.