Gary Johnson made hay in 2016 about the fact that it took Hillary Clinton longer to change her position than Dick Cheney. I feel pretty confident that he wasn’t always in favor of it when he was in Congress or working in the Ford Administration (after all, even the Human Rights Campaign was opposed to campaigning for marriage equality in the nineties [1]).
But I take your point, and I don’t understand why it is so surprising that politicians could hold a la carte views on social issues, something which I feel used to be much more common and allowable in our culture (see also Barry Goldwater’s support for gays openly serving in the military in the late 80s, a policy that wouldn’t be implemented until 2011, which to the original point he credited to a gay grandson).
https://duckduckgo.com/?q=Dick+Cheney+support+gay+marriage&i...