Federal Reserve in combination with the ratings agencies.
One provided cheap capital.
The other convinced banks to lend more than they would have otherwise lent by convincing them that MBS were quality when they, simply, weren’t.
If ratings agencies were held accountable for their bad ratings, they would all be in jail. If they were financially accountable, they would all be bankrupt. They are neither.
To some extent, those who were dumb enough to believe the ratings agencies have a hand in it as well. Why believe what someone is telling you if there is no downside for them if they are wrong ? Why even ask in the first place?