From a religious point of view if God had thought homosexuality is a sin he would not have created gay people.
When theology erodes and organization crumbles when the institutional framework of religion begins to break up the search for a direct experience which people can feel to be religious facilitates the rise of cults.