The formula is so simple if you knew it you wouldn't touch one.
1) The contents of the package are secret, so much so many sellers did not have a clue what was in them.
2) The rating applies (the agencies know what's in them) as long as there's any AAA material in them, rather than rate according to the average risk.
3) All customers were permitted to know was the rating and very little else yet they bought in billions.
Imagine an honest broker (what are they nowadays?), I have a package for you they call AAA but technically the law (who made that?) says they are unknown and probably based on highly leveraged debt and mystery mortgages, from uncertified borrowers. Not many would have been sold then.
However, the real scandal is not that people were stupid enough (including huge companies) to fall for this utter crap even though a quick enquiry would tell you exactly what I just have, but that it is allowed by all the countries who allow trading in them. All of them as far as I know. So not just a few bent governments, like Britain (the freest market in the world according to Max Keiser, free of rules and regulations) let this garbage pass from seller to buyer, but as many as I have seen fall like cards when the defaults happened.
Here's a polite description while others prefer to tell it more how it is