Greed.
Example.
My brother gets a mortgage in the Miramichi. The bank will not go more than 25% of monthly income on mortgage payments and requires mortgage insurance.
He moves to the U.S. as a temporary worker – gets a 40% of monthly income mortgage without even blinking.
Housing prices were inflating and people were using that pseudo-equity to buy, buy, buy. Then the housing market tanked – and housing values fell below the mortgage amount left on the houses.
Banks knew these were risky loans so they bundled the loans into these mortgage-backed securities and sold them on the wider market.