How on Earth did he survive the Republican vetting process to even become their nominee? That's a question worth asking.
I suspect the Republican establishment was thrilled that a self-identified gay man wanted to run as a Republican. That furthers a narrative they love to push: that the GOP is a fine place for gay people, and opposition to Don't Say Gay is overblown.
Did a grifter latch onto a gay identity knowing certain GOP operatives would therefore be more likely to throw him their support?
Quite possibly. But of course you're right that his marriage to a woman has little to no bearing on his sexual orientation.