Fannie and Freddie allowed millions of people to acquire 30 year fixed rate loans at rates lower than the corner bank could or would offer. Once they deviated from their risk model, they got in trouble. If they wouldn't have become involved with trading sub-prime paper, they would still be viable.
Greed over origination fees and fees from securitization.