A whole lot of comments here assume that the rating agencies are doing this because they're totally driven by greed. I think what people neglect to mention is understand is that rating agencies are overwhelmed by complex securities partly because they're made up of B-players.
In b-school, it's very common to see all the finance A-players gravitate towards PE, banks, HF and prop shops. Then the student sub-layer below them go to boutique versions of the aforementioned entities and it's usually Group B.
Believe it or not, this has a harsh impact on the culture there. Ask anyone you know who works at a lower level bank about how pointlessly harsh the culture is. My hypothesis is that: being made up of B and sub-B professionals, rating agencies just don't have the in-house intellectual capacity to do the levels of diligence they'd be expected to do to prevent the A-players in banks from cheating the market