The fact that you have to keep stomping cockroaches doesn't mean your house isn't infested.
I disagree, I think it's really just how it's dealt with that matters.
And again, this is literally the first time I've seen a comment like that on HN.
One the other hand, I personally don't remember seeing such comments before. Does this really happen regularly?
I don't agree. Perhaps the person who says being gay is a mental health issue has a deep knowledge of a technical subject that is of interest to the community, and 80% of their posts are about that subject, and very informative, while only 5% of their comments are about being gay as a mental health issue. Banning such an account outright would deprive the community of the 80% of comments from that account that are informative and useful. If they're not banned, the 5% of the comments that the community finds problematic will be downvoted most of the time. This is a more measured and better targeted reaction than an outright ban.
If someone is on a crusade to convince everyone that gay people are sick, on the other hand, and all their posts are about that, then that's a different matter. Such an account is not really contributing anything useful to a community like HN. So ban away, I guess.
There's another reason. As an LGBT person myself, I want to hear opinions that are hostile towards me, even against my very existence. I want to hear them because if I don't, I won't be aware of all the awful things that people make up in their minds about people like me and I won't know how to protect myself against them. Of course I already know many of the awful things that people think and say and do, but having those opinions out in the open where everybody can see them also acts as a barometer for popular opinion. If everybody starts agreeing with the person who says gay people are mentally ill, then I know things are turning bad. If everyone challenges such opinions, and I can see that they are downvoted to [dead], then I know that at least this community is not uniformly hostile.
Last, if someone really thinks that people like me are sick or shouldn't exist, what's the point of banning them? That won't change their opinion. We can't change peoples' minds forcefully, and even if we could, we shouldn't. Freedom of thought means that some people will think thoughts everyone else finds despiceable. So be it. If we only accept some views in public discussions and ban all the rest what happens when the political winds change and it's my thoughts and opinions that are not kosher anymore?
They do represent an aspect of the community. Not the community as a whole - you seem to assume that every criticism of a part of the community is an attack on the whole - rather a toxicity within it that seems to be growing, albeit slowly and not without resistance. That it is growing isn't a reflection on the users and moderators as much as the society that feeds into the community. We can only do what we can, but no one can command the tides.
To pretend this toxicity and bad behavior is something alien and wholly detached from the community, or that because comments are flagged and killed they don't represent the community, is specious and counterproductive. All of it is the community, good and bad. This rising toxicity and anger and cynicism is a real problem, and if you didn't take every criticism of the community so defensively as you seem to, I think you'd agree.
No, I don't know what can be done about it, but I'm certain it's not a problem that can be solve with software classifiers. I'm not going to be ashamed for pointing it out and complaining about it, either. If we simply quietly downvote and flag but otherwise stay silent, then there's no social pressure against that kind of behavior.
But I know you don't like repetition so I'll try not to do it that often.
People already do speak up.
I just don't think that HN has a general homophobia problem. Such comments are definitively outliers and are dealt with by the mods and the community. The only thing I would complain about is that it doesn't happen fast enough for a site like this where posts come and go quickly.