Homosexual relationships are wrong in the eyes of the one who designed the reproductive process. A robot that dosen't function the way it was designed might gain sympathy in the eyes of it's mechanical peers, but that doesn't mean it's working. Again, I can only give a specific answer to a specific question.
So, wait. The omnipotent deity can't fix it? He not only fucked up with humans, but also animals? He can't fix whatever causes homosexuality so it pleases him again? He gives us the desire and love of the same sex, with the force of the most primal drive on the planet behind it, and then says "Yeah, don't do that. It's wrong. Go sleep with a woman, even though you have no desire to."
Why are we worshipping him again, if he's this incompetent? It's not even a question of free-will, he just fucked up, end of story. One of the problems I have with god and the problem of evil, "Free will!" doesn't cut it because so much evil in the world is from non-human sources. Hurricanes, gamma ray bursts, supernova, animal attacks, earthquakes, radiation, poisons, genetic disorders. The best I've heard someone explain it is as a "If good things happen in one part of the universe, bad things have to happen somewhere else."
In which case: WHY BUILD IT THAT WAY?! Seriously, God is the most incompetent engineer I've heard of it. If he was a human, he'd be fired and living on the street from the crappy designs and crappy mechanics he's made.
As for your analogy, it's not so much a robot that doesn't function the way it's designed, as it is a robot that malfunctions -by design-, and then hating it.