S&P, Moody’s, etc., are probably more responsible for this mess than banks. These ratings agencies blessed packages of sub prime and sub prime refi’s like they were government bonds.
And a few things that some crooked people were doing.
Google “rent a credit score”.
I don’t think there was a huge amount of fraud, but as in any situation, some bad apples were doing some bad things.