The banks made unqualified loans to people and made money.
The banks sliced and diced these toxic loans (derivatives) and sold them as Triple A investments... and made money.
The banks then bet against those toxic investments and made money.
The banks had their clients invest in these toxic instruments, and made money.
The banks were then bailed out by the taxpayers and made money.
The banks now own all the foreclosed property.