Female is considered the "default" for the species. If a Y sex chromosome is present during development in the womb, a chemical called androgen causes structures to develop into testes. In the absence of androgen, ovaries form.Well from what I have read/heard which is nowhere near proven fact is that the development of the physical sex organs and brain development are largely different processes. In the womb, your sex is basically determined at some point and your embryo forms whichever genitals.
The brain does develop separately from the sex organs, BUT some of those hormones active in the brain are directly related to the chemicals produced by the sex organs. And that has a genetic component.Your brain chemistry is largely developed by various hormones and is a pretty active process during early childhood and puberty.
In other words: genes--->hormones--->sex organs--->hormones--->effects on brain activity and development.
You mean xenoestrogens? As an FYI, that is still a contested topic. And it is further complicated by the fact that certain wildlife species are transgendered or hermaphroditic by nature; that human male bodies naturally produce and require estrogen; and the lack of a definite causal link between feminization and homosexual behavior. And historical evidence of both male and female homosexuality in humans prior to the industrial age.In this industrial age, high amounts of estrogen have been found in the water supply and other consumable goods. This could explain how young males develop an attraction to the same sex.