The regulations you've mentioned in previous threads on this topic didn't apply to the institutions purchasing, bundling and reselling the subprime loans.
The banks were making loans because they could make a quick profit on them by reselling them to the investment banks who could bundle them into a clever security which increased the investment grade and enabled them to resell it at a profit. This is the epitome of free market transactions, every step along the way is justified by profit.