There is so much still be learned about human sexuality. We have abilities that few, if any other species share. For example, what they call "hidden" ovulation. You cannot tell if a women is ovulating (at least on any conscience level, there may be subliminal ways we are unaware of like scent). Humans are capable (and often willing) to have sex 24/7/365. Then there is the orgasm; we already know that few mammals enjoy sex like humans.
Whether or not you believe we were all created by G-d or just an accident of nature, humans were built to experience sexual pleasure. Most of us know how powerful the human sex drive can be. For a religion, whose goal is to control its membership (and this is the true point of most religions), controlling sexuality is a MUST because they compete with it.
Dictating whom you can have sex with, and when, gives the organization a fair amount of control over the humans within their organization.
Yes, sex can spread disease. This has always been true, gay or straight. Long before AIDS, Syphillis was killing often, and it crossed all economic and racial lines.
So yes, even without religion, there are valid reasons for controlling sexual behavior because of disease and so that there are fathers who can support the children born of the group.
As to homosexuality, we must keep in mind that infant mortality has been a huge issue during most of mankind's history, and that until recent history, all cultures were agrarian. More children meant more people, more people meant more labor. More labor meant larger crops and more food, a stronger economy, etc. Homosexual behavior does not bring forth children.
That would seem to be the reason for the prohibition. However in the modern world, that point is moot. We have more than enough humans, and plenty who are already starving or dependent upon others to survive, and population growth has not stopped.
The idea that marriage exists only for the production and rearing of children is also archaic and outdated. There is no requirement that ANY couple be "fruitful and multiply." If proof of fertility was a requirement, then lots of straight couples could not marry. If you added to that requirement an intent to have children, then you'd have even fewer couples who would qualify to marry.
Love isn't rational, it is emotional, and we love whomever we love. Sexual attraction is an area for which even the scientists do not have all the answers on.
Why humans must seek simple and pat answers to every complexity in life puzzles me. I am not gay, but I cannot think of a single reason why I should have a problem with someone who is gay, even if that is my child. And I don't think anyone else should tell me who to love or hate.