^ First, just want to say that I appreciate your civil tone.
Regarding ratings agencies: they've never said that CDOs were a gigantic mystery. CDOs are quite complex, obviously (and you can even have CDO-squareds, essentially a CDO of CDOs), and determining how to rate the risk of the various tranches in those instruments was complicated. Ultimately, the ratings agencies relied on the same real-estate and mortgage data that the banks did, in the case of CDOs that relied on securitized and pooled commercial and residential mortgages, and the same empirical assumptions, in running their computer models. And so they ended up with the same under-appreciation of risk.
Also, realize that since the banks themselves rely on these agencies in determining their own investments (such as in CDOs), in structuring their lending, etc., the banks do not have an interest in the agencies being incompetent, or making mistakes.
Regarding the SEC: the problem with realities on paper in the computer age is that it can take a very small amount of time for a program to pick up the thread and run it down. It's actually become much more difficult to get away with things like insider trading.
While many defense lawyers in securities practices have worked for the SEC at one time or another, they're forbidden from advising their clients on how to best commit a criminal act. Their advice would almost inevitably be the following: don't do it, the odds are against you, and you'll eventually get caught.
Whether you want to chalk that up to ethics (people generally don't work for the SEC, or as a prosecutor, for 20 years because they're in it just for the money), or to the fact that they're intimately aware of how good the government is at uncovering these schemes, is up to you.