Fannie Mae and its sister institution Freddie Mac buy mortgages from banks. That is what they do. This means that when Fannie and Freddie lose money, they paid banks too much money for the mortgages.
This point should be so simple that even an economist could understand it. This is why it is disturbing when news articles on Fannie's newly announced loss of $15 billion in the last quarter don't point out that this is money given to banks.
The key issue is whether Fannie and Freddie's losses are due to mortgages and mortgage-backed securities purchased prior to their takeover in September of 2008 or whether they are the result of mortgages purchases subsequent to that date. If the latter is the case then the Treasury Department is effectively using Fannie and Freddie to run a TARP program, purchasing mortgages from banks at above market prices. This amounts to a huge taxpayer subsidy to Jamie Dimon, Lloyd Blankfein and our other favorite bankers.