I think you moved pretty quick past the part of why mortgages weren't safe.
Mortgages were given to people with no documentation allowed people to lie about their income and get loans they couldn't afford. That was alright because they had low introductory rates/payments they could afford. The market was getting more expensive and you could refinance to a better loan when you're LTV was more favorable before the balloon payments hit.
Those were the loans that were rated AAA.
Once the market growth slowed just enough to not allow the refinancing before the balloon payments, the defaults started, at first slowly then all at once.