Nobody fully knows why people are attracted to members of their same sex. Members should acknowledge the complexity of this matter and be sensitive to those most impacted by it. From MormonsAndGays.org, an official Church resource.
MormonsAndGays.org
"The experience of same-sex attraction is a complex reality for many people. The attraction itself is not a sin, but acting on it is ... individuals do not choose to have such attractions, [but] they do choose how to respond to them. With love and understanding, the Church reaches out to all God’s children, including our gay and lesbian brothers and sisters.... No one fully knows the root causes of same-sex attraction. Each experience is different. Latter-day Saints recognize the enormous complexity of this matter. We simply don’t have all the answers. Attraction to those of the same sex, however, should not be viewed as a disease or illness. We must not judge anyone for the feelings they experience."