People got greedy and started re-packaging sub-prime loans due to financial engineering enabled by the ratings agencies, which were greatly influenced by the erroneous notion that "housing always goes up" and incentive to collect for each CDO rating they opined upon.