Fannie Mae (NASDAQOTH:FNMA) and Freddie Mac (NASDAQOTH:FMCC) have both released their second quarter results, and both companies reported substantial profits. Fannie Mae reported net income of $3.7 billion and Freddie Mac made $1.4 billion.

However, all of Fannie and Freddie's profits go straight to the U.S. Treasury, so why should investors even care? And, will the continued profitability of both agencies give shareholders the legal ammunition they need to finally see some return on their investment?

Strong results from both agencies
As mentioned, both companies delivered strong results for the second quarter, combining for more than $5 billion in profits. While this is substantially less than the companies earned in the first quarter, most of the drop is due to receiving less income from settlement agreements.

Perhaps more importantly is the fact that the companies were profitable despite this quarter being the first in a while without a major one-time windfall. As Fannie's CEO said during the earnings call, "This quarter gives you a good sense of a normalized environment for Fannie Mae."

How much more until the government is "paid back" for the bailouts?
I use the phrase "paid back" in quotes because Fannie and Freddie have already repaid every dime they received from the bailouts and more. Including the recently announced profits, Fannie Mae will have paid the Treasury $130.5 billion in dividends and Freddie Mac will have paid out $88.2 billion, which represents a combined $30.3 billion more than the companies received.

However, as it is noted several times in both companies' earnings press releases, dividend payments do not offset prior Treasury draws. In other words, the $117.1 billion and $72.3 billion in preferred stock held by the Treasury in Fannie and Freddie remains the same, regardless of the amount of profits paid out as dividends.

This is important, because the latest bill attempting to wind down Fannie and Freddie is calling for the government to be paid back "with interest" and to be compensated for the risks it took by bailing out the agencies.

Okay, but how much will be enough? That part of the bill is not at all clear, so does it mean that they Treasury needs the nearly $190 billion in outstanding preferred stock paid back, plus interest, in addition to taking all of the companies' profits as "dividends"? While this seems excessive, if not impossible, a solid figure would go a long way in letting shareholders know whether or not they're likely to see any money from their investment.

More leverage to the investors?
In a nutshell, as Fannie and Freddie earn more money, the investors' case that they should be entitled to some profit looks better and better. A group of shareholders and hedge fund managers is attempting legal action to force the Treasury to share the profits.

In fact, Pershing Square Capital Management, the hedge fund firm headed by Bill Ackman has just sued the U.S. government, claiming that requiring Fannie and Freddie to pay 100% of its profits as dividends to the Treasury illegally deprives the common shareholders of the ability to reap rewards from their investment.

Pershing Square calls the Treasury's taking of Fannie and Freddie's profits a "brazen" practice, making all who own common stock "shareholders in name only." The complaint accuses the government of violating the Fifth Amendment of the U.S. Constitution by taking private property (shareholders' profits) for public use (the Treasury) without just compensation.

The new lawsuit seeks damages and other remedies – presumably a change in the profit-sharing arrangement.

There are several previous lawsuits still pending as well, which mainly focus on the preferred stock of both companies, which has also not paid any dividends to shareholders.

Will they prevail?
It remains to be seen whether shareholders will be victorious here, but it's hard to make the case that shareholders deserve nothing. After all, many of them have been holding their shares since before the financial crisis and are now hoping for some relief. And other bought shares for pennies when it looked certain the agencies were doomed, and now want to be rewarded for the risks they took.