Our own Paul Fidalgo gets it:
On to the practical. Add this all up, and look at the electoral map with an analytical eye. Politically, the president would be handing the White House to Romney by advocating for or initiating federal action on behalf of national marriage equality. Imagine the barrage, the overwhelming deluge of attack ads in states like Ohio and Virginia that would hammer the president for imposing his imperial, hyperliberal will on OUR upstanding, independent, moral state. Obama’s message to the swing states is, in essence, “I’m cool with gays getting married, but don’t worry guys, I’m not going to mess with your state.” Electorally, he has no choice. And it goes without saying that, as Obama himself points out, a Romney presidency would mean the opposite; a president who would work to impose his view of marriage at the federal level, whether your state likes it or not—which is true!
So Obama’s personal moral opinion is in favor of the rights of gays to marry. Politically he supports the process of each state determining whether gays will have the right to marry.
This coming presidential election is all about the swing states and the independent vote in those swing states. The Repub PACs will pour multiple tens of millions into attack ads targeted at the independents in the swing states during the last month of the campaign. Mother Theresa might not be able to win an election for dog-catcher facing this kind of on-slaught.
I think Obama showed courage, as he has at other times in his presidency, by asserting this personal support of gay marriage rights, despite some political risk to his re-election.