To answer the OP's question, "Hate the sin, but love the sinner" is fundamental to Christian doctrine. Christians believe that human beings began as innocent, basically good creatures but have been corrupted over time by their own gravitation to sin, of which homosexuality (and really, all sexual behavior that is not procreative heterosexual coupling within a church-recognized marriage) is one. Their belief is not that homosexuals are evil for their lifestyles, but that they have given in to a sinful temptation that God intended them to resist. Much of Christianity, and this is true of religions as a whole, is about attaining some level of mastery of the self so as to transcend baser, more instinctual urges, with the promise that whatever hardship this brings upon one will pale in comparison to the more blissful afterlife one stands to inherit. In the context of religion as a tool of social and political cohesion and control, this makes sense - sex, drugs, gambling, rebellion, and other such things are potentially costly, destabilizing forces in human life, so having at least an ideal to try and shun these things and strive for something higher will leave a people better off than would a hedonistic embrace of all corporeal pleasures. Heck, I would argue that many individuals of my own less faithful generation are far too free and copious in their use of alcohol and drugs, and I sense a certain stagnation in many of them as a result. So to some extent, I honestly understand why these sorts of fleeting, shallow pleasures are downplayed in many religions the world over.
Anyway, in the time where Christianity came into being, "homosexuality" as a marker of identity, rather than behavior, simply did not exist. We understand now that there are those exclusively attracted to their own or to the opposite sex, and a very fine gradient in between. But in Ancient Rome, for example, the culture that ruled over the area where early Christianity first arose, the vast majority of gay folk - particularly those of the upper class, who would have been the moral "tastemakers", for lack of a better word - would still have been expected to marry, have kids, and pass the same milestones as any other Roman citizen because marriage, in that world, was not so much about the personal and the romantic, as in today's world, but about property rights, social standing, political ambition, and other such factors. A man, in such a society, would have had a certain degree of freedom to pursue extramarital romantic relationships, and while homosexuality might have been frowned upon, to a degree, it was really the passive homosexual partner that was met with the most scorn. In such a world, homosexual behavior was not understood as something fundamental to one's character, but as a "side dalliance", something that was part of one's personal life, rather than a matter of public importance. There is a wide variety of ways that societies have related to homosexuality, but in my own studying, this idea of it as something that one does in addition to the "real" things, a preference laid atop one's life rather than something a part of people's personal foundation, seems pretty common among many cultures, probably because, most of the time, that's what it WOULD have been. Given such a context, it's not hard to see how it might then have been understood as simply another earthly pleasure, to be discouraged and stamped out like all the rest.
So, OP, the reason Christians say they don't hate gay people, despite disapproving of homosexuality and of gay marriage, is because one of the basic principles of their worldview is that all human beings are tempted to at least some extent by things and actions that fall outside what God expects of the righteous. What they think is that gay behavior is wrong and that those with the desire to engage in it have a religious duty to shun it, but they might be able to relate to the difficult struggle that comes with being a righteous person and understand that, outside of their sexual and romantic lifestyle, a gay person can be good in other respects.
As for why such beliefs persist? Because death is scary, religion comforts, and if Christianity helped them in one respect, and has been helping people for far longer than any modern concept of sexuality, then it's probably right in this other respect. I disagree, and resist those who would try to impose this philosophy via legislation, but I do at least understand it, somewhat.