In completely unrelated news, why do you think most functioning civilizations persecute homosexuals?
It serves no useful function.
Firstly, whatever makes people homosexuals tends to also make them extremely promiscuous, leading to them being vectors of nasty sexual diseases. It tends to also make them pedophiles, and you can argue separately about why a pedophile taboo exists, but let's take for granted that it's bad (ain't like anyone around here is going to argue otherwise). Homosexuals in general just seem to be opportunistic sex-crazed maniacs and live fast and loose lifestyles. That's not true of all of them, and I think much of it is cultural, but it seems common enough to understand why ancient patriarchs would condemn the lot of them.
The closest you could maybe argue to a useful function comes from the Greek erastes-eromenos relationship, and even that's controversial. I found it fascinating (I know, lol gay) in college, but I understand people around here say it's all revisionist fairy tales. But the way it was pitched was that
in some Hellenic cities in
some time periods (not all of Greece all of the time)
among the upper class there was a tendency for old men to groom younger lads in a relationship that was part pedophilic rape and part mentoring. However, you could just as well look at this as having been the equivalent of the tranny/gay pride craze in today's society (Athens = San Francisco), a social contagion verging on a mass hysteria that spread out of control that was unwelcome before and made itself unwelcome again. Most importantly, there's no real reason why your mentor should have to grind his willie on your pubescent thighs. Really, you could probably compare it to the out-of-control sexual perversion in the British aristocracy. Same thing, people in high positions of power are free to live chaotically; so are the lower classes. It's the middle class that preserves the morals of a culture.
Another thing you find is that all cultures that aren't actively self-destructing from Commie subversion have values that exist to promote family life. You have gender roles because men and women simply do not - statistically - have the same personalities. You have pairing of male and female to make children and women take care of children, at least below a certain age, and you have defined families so that people actually take care of those children with male and female authority figures. These don't have to strictly be biological fathers and mothers (Cherokees, for example, had avuncular families, Heian Japanese had duolocal residences), but it seems like cultures converge on monogamous households with biological mothers and fathers for a reason. It encourages the most responsibility, it reduces social strife by redistributing women (a limited resource). The more a culture's wealth comes to be dependent on men the more authority the men will, understandably, gain, both due to plow agriculture and to warfare.
What role do homosexuals have in this? They're aberrant by nature. What causes them? I don't think there's a single cause. I think it's clear by now that the nurture vs nature debate is a bad way of looking at it; some are born that way. Every culture has noticed that some little boys are just faggy and they think like girls and grow up to like playing with pricks. But grooming makes more of them, and the tranny explosion shows that you can even, in some sense, groom adults to, you put the idea out there and they're receptive to it when maybe they would have never thought of it on their own. It's both, it's both a biological defect and culturally propagated. But even in societies like the (again, alleged) Greeks, it was still a minority perversion. Homosexuality just isn't human nature, especially for men who seem to, across cultures, have more of a revulsion to it.
So even your cultures that tolerate homos still expected them to marry off to women, to raise children, to continue to perform male gender roles. Those cultures (like Cherokees) that recognized trannies usually required them to fully conform to a set of gender roles. There was no individual freedom, no mixing and matching. If a boy is broken in the head and he wants to take dick up the ass he'd better go spin cloth with the women. If he wants to spin cloth with the women he'd better take dick. That's how Cherokee culture worked, you could be a man-who-lives-like-a-woman or a woman-who-lives-like-a-man, but you had to COMMIT to one side or the other, and men-who-are-women were usually scorned. A woman that can live in a man's world is a badass, admirable. People have told stories like Mulan forever; they're rare, Western culture went overboard with that stuff due to girl power, but people have always recognized how impressive it is when a woman really can be a man. The reverse, a man that shirks his male duties, is contemptible, because it's understood that a man's life is simply harder, except for childbirth, and a tranny never can do that.
So the traditional culture makes their men marry, have sons and daughters, raise sons and daughters, do men's work, and the defects are given various ways out, but they're sure as shit not celebrated for it. What prestige is there, then, in sucking dick? None. It can only undermine the family. Undermine the martial relationship. Encourage faggotry in the children. And people have always wanted to marry for compatibility. Maybe not love as such, not like we think of it now, but political marriage is a rich man's thing. Even cultures with forced marriage still have fathers that love their daughters and try to do well for them. Who would want to marry their daughter off to a pole-fancy?
So that was a giant ramblepost just to say, it's taboo because it's completely useless to the world. Western individualism has many, many upsides, but its one massive downside (that may yet kill the world) is that it tends to reject all social responsibility. Ancient people understood that the continued existence of your people carries a ton of social responsibility to the point that sex is not really a private act.
Edit: We're at a point where people are going to have to learn to accept that breeding is mandatory or social support - pensions and stuff - is directly linked to it. Likewise, society is going to have to learn that the only way to deal with single motherhood is to start punishing it. Unfortunately, women in the West are, based on this abortion shit, especially prone to shirking personal responsibility.