Here's part of the problem.
Fannie Mae was not really a public entity at the time, and not really a private one either.
A few things happened at once to make this perfect storm. One, quasi-governmental organizations Fannie Mae and Freddie Mac decided to loosen their lending requirements to make more people eligible for mortgages. Two, the lending industry discovered that it could make a ton of money by bundling mortgages and calling the resulting bundle a security, which it would then resell to investment banks. Three, with the increase in potential buyers, housing prices spiked across the country.
While the real estate boom lasted, homebuyers did not need to pay down a mortgage in order to gain equity... if they could pay enough to stave off foreclosure for two or three years, they could flip the house, pay off the mortgage entirely, and pocket a nice profit besides. The new buyer was working the same plan. So a house that was fairly priced at $150K would sell for $175K, to someone who knew it was too much but who bought anyway because in a few years they'd be able to turn it over for $210K, which seems silly until you realize that that buyer would eventually sell for $275K, a ludicrous sum except when compared against the $350K the house would sell for next... and then all the new homebuyers were used up, and the guy who owed $350K on a $150K house suddenly was stuck with an ARM that had adjusted beyond his means or (worse yet) a reverse-amortization mortgage and nobody to sell his house to.
So what does he do? He walks. He declares bankruptcy and cuts his losses. The bank doesn't get paid, so the company it sold the mortgage to doesn't get paid, so the commoditized mortgage package suddenly isn't worth what it used to be, and everybody down the line takes a screwing because they tried to run the real estate market like a Ponzi scheme.