How does this happen, how do you date a person for 3 years when you don't even like him.
Some people spend their whole lives in merriages denying who they really are... At least lately people are feeling more confident to admit who they are and conquer their own self depreciating feelings
If you put aside the Yuri, it's not because you don't like someone at first that you won't grow fond of them. You never know what could happen. Maybe you thought you don't like someone but the more time you past with them, the more you like it.
Even beyond that, it's possible that you do like them, or even love them (because eros isn't the only type of love), but you just don't like them in that way. Maybe they asked you out first and you say yes because you don't want to hurt their feelings and you think your own feelings might grow over time (after all, it's a common enough trope for friendship to slowly grow into love). Maybe you didn't even realize there was a difference at first and you thought your feelings were that kind of love only to realize, over time, that your wrong.
There are a million other reasons why a gay person might get into a straight relationship. Heck, it's not even limited to gay people; strait people get into bad relationships all the time for all sorts of reasons. The way sexual minorities are treated definitely makes things worse, but I think the way romance is often presented in media is also a major factor. It's almost always either true love, and all will be right with the world after some minor struggles, or it's a complete sham and at least one of the lovers has some major moral failings. In either case, it's always bombastic and blindingly obvious by the end. Then there's the utter mess with how persistence and grand gestures are portrayed.
In short, no part of of how romance or courting is portrayed is realistic, but it's going to color people's expectations and perceptions, even if they consciously acknowledge that it's fake. The simple pervasiveness and lack of good counter examples means it's going to have a significant influence on your world view.
Very rarely are healthy ends to relationships explored, nor do we see much made of more subtle feelings or other types of love and I think that needs to change. The fact that when we do get them, they tend to work very well makes it all the more tragic.