Does he gain or lose politically? (That's really the question.)
How can he rake in votes just by seeming to care about the rights and interests of gay people? Not even seeming all that much — he's against same-sex marriage! — but just by stirring hopeful feelings and looking like somebody who cares. Well, he's already done it once. Why shouldn't he believe that what worked once will work again?