I would suggest it is not a "mistake", but rather a natural expression of perfectly normal behavior. The basic evolutionary dogma states that variation exists within a population, like longer and shorter beaks in pigeons. Selection determines survival rates and so on. We've all heard it (or at least I hope so!)
Well, homosexuality is something that exists in the population just like coarse or smooth hair, lighter or darker skin and so on - and it would make sense that a continuum would exist there, too, as it does in the case of other phenotypic traits.
Our aversion to it comes directly from religious sources, and these religious aversions stem directly from the role of religion in society, which is a to act as a behavioral control mechanism. Why discourage homosexuality? Well, it increases the population growth rate. This is a means of spreading the religion, and religion is linked to politics, finance, etc. Classic Imperialist strategy - breed them out. Controlled breeding is a key component of every religion and is utilized in phenomenally complex ways such as celibacy in the Catholic Priesthood. This keeps the money in the church. It's a brilliant, highly effective strategy.
Religion wants population to expand. Therefore homosexuality is discouraged. Eating pork is potentially dangerous (unless you cook it properly), so it is discouraged for the same reason. Expand and retain the population.
Ultimately homosexuality is just sexuality, and I guess we could draw a Venn diagram to demonstrate how sexuality itself is separate from reproduction and interpersonal bonding, yet intersects both of these. This explains why two strangers can meet, have sex, and part ways without reproducing (at least intentionally) or even really forming a relationship. Likewise two people can have a very deep, loving relationship without having sex. Or two people can reproduce without ever meeting or forming a relationship - simply for the purpose of satisfying the drive to propagate - and so on.
Sexuality is just sexuality, it's neither good or bad, though it is necessary for reproduction and ultimately survival. If we met, fell in love, but never had any desire to rub our genitalia against other's genitalia in the pursuit of tactile pleasure then none of us would be here.
Thanks to modern technology, though, even homosexuals are now capable of reproducing, so the old population control argument is becoming less important. Granted it is easier for a Lesbian couple to reproduce, but males could certainly interchange chromosomes in a test tube and synthetically replace the nucleus of a human oocyte. There is no biological reason a person cannot have two fathers.
I think it's time society got used to the fact that homosexuality has always and will always exist. As previously stated it is not good or bad, except in terms of its satisfaction of the human drives for companionship, sexuality and even reproduction. The consequences of these events could be seen as positive or negative depending on the situation.