IOW Obama's view on Gays bends with the wind.
It certainly seems that political necessity played a role in his public position. With the major exception being his change in position in 2011. There was no particular need to do so. And with the Tea Party having recently taken the House, some pretty significant risks. As it may have forced Obama to expend political capital on an issue that wouldn't reap him much political gains.Yet he did anyway.
I suspect Biden's vocal support for gay marriage wasn't a litmus test. It was Uncle Joe shooting off at the mouth. And once Biden had claimed his ground on the issue, the costs of silence were as great as the risk of taking a stand. So Obama switched sides and expressed his actual opinion rather than an official one. And once he did, Obama's support was vocal, committed, and in the case of the DOJ, authoritative.
I think the switch was well timed. As it either coincided with or sparked a major shift in America's thinking about gay marriage.