As I understand it, CDOs on subprime mortgages would have been a reasonable investment vehicle if the odds of mortgage defaults and the correlation among default rates in different regions had stayed at historically low levels.
The problem was that because investors were pumping money into these CDOs, real-estate bubbles inflated simultaneously in a bunch of markets across the country, and then popped simultaneously.
The problem was that there was an entire feedback cycle of fraud going on:
* Lenders were making outrageous loans (no money down, no payments -- just accrue more debt!) and coaxing people to sign up for them. These lenders collected transaction fees, then sold these loans to investment banks.
* Investment banks carved up these B-rated loans into fractional amounts, then repackaged them into bonds. The ratings agencies -- due to either fraud or stupidity -- would rate these bonds AAA, because their contents, despite being low rated, were diversified. The thinking was that they wouldn't all fail at once. Ratings agencies then collect a big fee for rating the bond well.
* Still more investment banks would take these bonds carve them up, and create CDOs, just another layer of abstraction using the same basic template. Whatever bad ratings couldn't be laundered away in the previous step were laundered away in this step.
* Banks would then trade these instruments.
It appears to have been a "don't ask, don't tell" atmosphere between everyone in on the game.
"The Big Short" is a great read on the whole situation.
The problem was that because investors were pumping money into these CDOs, real-estate bubbles inflated simultaneously in a bunch of markets across the country, and then popped simultaneously.