A lot of scientific research has been done on this. The general result is that it's a combination of genetics and environmental influence.
The research does not suggest that it's a choice or state of mind though. Quite the opposite.
In regard to the Church stance though, sure. They can believe whatever they want. But when someone says that it's a "mental illness" then that's not following the rules of the Church. It's just bigotry. The same way that if the Church disowned Asians, it would still be racist to insult Asians for being Asian just as it's bigotry to insult gay people for being gay.
Sorry mate but you posted a whole lot of rubbish, and you haven't answered why some men and very probably women turn gay long after they married a hetro and had children.
WELL I'L TELL YOU THE TRUTH MATE.
People for whatever reason become bored with the same old thing in the case of men with the wife some find another one and either leave the original one, or just fantasise about sex. Their fantasies take them to alternatives including sodomy, some after fantasising about it will want to try it and get hooked, the anatomy offers alternative pleasures to hetro sex with the help of Satan.
This scenario also applies to young who may may lack confidence with the opposite sex, that's why some kids who are unhappy either try drugs or gouge themselves on junk food and become obese, while others fantasise about sex and end up wanting either a sex change or they gravitate to become gay.
BTW the great Chinese Philosopher said with our thoughts we make the world, if thoughts can shape the world it can certainly shape our desires and our personal make up.
BTW if you believe what you said about gays you must also believe that all addicts drink, drugs and gambling were born that way to.
Mate they all started in a very small way and slowly and gradually by craving which is another form of fantasising ended up becoming addicts, destroying their lives and sometimes the lives of their loved ones..
Perhaps you should learn more about Christian values and life style, if you do you will become a better person for it.
Al though some Catholics have been racists and some probably still are, our church never discriminated against other races in fact many Priests went to Asia to preach Christianity and were martyred their.