It is often assumed that players in a market (both buyers and sellers) will behave rationally, which should not be confused with behaving intelligently or logically. Rationality can be a relative, subjective term; it is often a matter of opinion. A rational person will almost always choose what they see as best for them, with the result being they get something they want as long as any recognized negative consequences are not realized in the short-term. Get what you want now, worry about the later consequences later. To put it more bluntly, people are selfish and greedy.
On the ground floor there were borrowers agreeing to loans they could not afford, and lenders offering loans they knew would default. Intelligent? No. Logical? No. Selfish and greedy? Most definitely. People with horrendous credit histories and income at or near poverty level were getting home/equity loans where the interest rate ballooned after four years, and even some where the interest rolled back into the loan principle for four years. Borrowers agreed to these outrageous conditions because all they saw was the immediate money. Lenders offered the loans because investment houses demanded more and more loans that could be bundled and sold. Again, immediate money.
Next on this assembly line are the rating agencies. Rating agencies are supposed to review an investment security, assess the risks, and label it as triple-A, double-A, etc. A rating of triple-A is supposed to be low risk. In fact, Wall Street considers triple-A to be virtually guaranteed. The rating agencies had no idea what were in these mortgage-based securities (neither did just about all of Wall Street). The agencies were given a batch to rate and generally (and essentially arbitrarily) rated 80% as triple-A, based on no research whatsoever. The remaining 20% were then bundled with other mortgages and resubmitted where 80% would then be rated a triple-A! This was plain and simple laziness.
There are plenty of directions in which fingers can be pointed. The fact remains that lenders are allowed to make any loans they want, however bad they might be, and borrowers are allowed to accept any loan that is offered, however unlikely they can afford it, and investment firms are allowed to bundle the mortgages and sell them, but rating agencies should never have rated investment securities that the agency did not research and completely understand. The rating agencies are the primary culprits.
Were the rating agencies selfish and greedy? Insomuch that laziness is a product of selfishness and greed, yes. If mortgage-based securities were too complex and lacked sufficient data for proper research then the rating agencies should have refused to rate them. Everyone else played the system, even those who bet the system would collapse, but the rating agencies enabled the system, dooming it to collapse.