The government(and taxpayers I assume) actually made out pretty well on the bailout loans. Considering the government still owns 99% of Fannie Mae and Freddie Mac, after retaining billions in profits over the last decade and a half.
Yes, US Treasury has gotten profit from Fannie/Freddie. However, there is concern from OMB that risk is not properly being calculated and thus in event of small housing crisis, US Government would have to back stop them again and possibly wipe out any profits gained.