This isn't exactly true. I'm not saying that homosexuality is a learned behavior. In my opinion, it is a combination of nature and nurture. I have yet to take the sexuality class in my psych courses yet. This is mainly because I want a firm grasp on psychology before I tackle the issue so that I can reason it out better. But, back to the point, your argument is slightly flawed here.
If sexual attraction is a learned behavior, then everyone would not be given a 50/50 chance. Homosexuals would have to fit into a certain niche, that fewer heterosexuals would fit into. Think of the brain as a brick wall. The lowest layer is made up of genetic qualities as well as hormonal qualities. A homosexual will have a predisposition to homosexuality. So, there, the first bricks are laid. Now, think as the next couple layers as young age. If a child is molested by someone of the opposite sex, they will subconsciously fear this sex, even if it is at a young age. There is another layer. Other factors would contribute to this. If a child grows up in a family that is only of the same sex as the child, they are more likely to identifiy with this sex. Another layer. It goes on and on from here, until you have a... for lack of better description... big gay wall.
I am not saying that all homosexuals were molested, or the likes. I'm just trying to point out that there is a niche that others wouldn't fit into, and for many, this is the way that it works.
Did I just make myself sound totally foolish?