How can homosexuality be immoral if people are born this way and they aren’t hurting anybody?
First, people can be born with abnormal appetites for alcohol, food, sex, drugs and a host of other sins. Some babies are born addicted to drugs because their mothers used drugs while pregnant. Simply being born with an attraction to something evil, does not diminish one’s responsibility to reject that evil. Second, immorality is not defined as simply hurting someone. There may be good reasons to hurt someone such as in cases of self-defense or war. A person can also engage in immoral acts that do not hurt others. For instance, if a man commits adultery and his wife never finds out about it, she would never be hurt. If a man fantasizes about raping children, children would never be hurt, but he would still be engaging in immoral behavior because he is intentionally fantasizing about committing an evil act. If this kind of fantasy led to arousal and masturbation, the evil act would be compounded by other evil acts, yet no one would be hurt.
What makes homosexual behavior wrong is that it contradicts the purpose of human sexuality, which is ordered toward union and procreation. Something is good when it functions as it should. Thus, our sexual faculties are good when they function as they should. “Good actions are those which direct a human power, capacity, or function toward its proper end. Evil actions are those which are contrary to the human good,” and, thus, “make the person himself to be evil, for it removes the order the person has to the good.” Additionally, our actions have an end toward which they ought to be directed and an end toward which they are actually directed. As discussed in a previous article, human sexuality ought to be directed toward procreation and union between one man and one woman. Thus, sexual activity that intentionally frustrates these ends is evil. It would be like purposely filling one’s lungs with water. The lungs are not created for that end and filling them with water would frustrate the lungs’ proper end. Thus, “[t]hose who engage in homosexual conduct bring their sexual faculties to bear on a member of the same sex. In doing so, they direct the function of sex – which ought to be directed toward the generation of new life – to an end that is intrinsically unfit for this direction. We may conclude, therefore, that homosexual activity is immoral.”
Note: As mentioned in the previous article, one can have homosexual inclinations/attractions, but just like any other sin, one cannot act on these inclinations. If one acts on these inclinations, as with any other mortal sin, one must avail himself of the sacrament of reconciliation and “sin no more.”
For more on this issue, read Catechism paragraphs 2357-2359. If you or someone you know struggles with same-sex attraction, Courage International offers help. Their website is https://couragerc.org/.
 Timothy Hsaio, Why Homosexual Sex is Immoral, (PDF) 2-3.
 Hsaio, Why Homosexual Sex is Immoral, 7.