The bad idea was making bad loans, putting them in CDOs, and then using flawed models to certify them as risk free. That's irrational.
Dividing up the credit risk on a pool of loans so that some people lose money only if all the loans go bad is a very good idea. You just need to make sure they are good loans.