This is very easy.
A recipe, of you please:
1 homo sapiens
1 holy book
What you do is:
First, you read a holy book, one that says “because of some issues regarding gender roles in our society, anal sex in which a man is penetrated by the other party (parties) is wrong”, and then conclude that “therefore, gay sex is wrong”, which you swiftly re-parse into “gay people are sinners”. You then proceed to empirically verify this hypothesis, and find it false. Gay people are not only not evil, as you expected them to be, but they are remarkably not altogether dissimilar to yourself(1). They have families, relationships, and sometimes even buy their books in the same online bookstore as you do. You may even realize that they like the same films you do. They might even drink the same brand of coffee as you do, provided you’re an insufferable coffee snob(2).
You then proceed, by a strange stroke of luck that mostly can be explained by somebody’s internalised homophobia, to become friends with some of the gay people who are morally inferior to you by default because of the fact of them engaging in sexual intercourse that may involve a position explicitly forbidden in a very old book you once read(3). They are fun, and you like to hang round with them. They also suffer from internalised homophobia, so they have nothing against hanging round with a morally and intellectually bankrupt hypocritical bigot.
Anyway, will it lead you to revising your initial hypothesis? Not in the slightest bit.
You continue being the same bigot you were to start with, now with the added cognitive dissonance, and bonus self-recriminations of “why am I not disgusted by gay people, oh noez!”, and “am I being permissive???”.
This is how religion oppresses religious people, guys. They may realise there’s nothing wrong, empirically, with being gay, and yet! Old book says it’s wrong, therefore it is.
(1) Apart from, on the average, being less bigoted than you.
(2) I am!
(3) That is, if you read it at all.