The term "gay" is used to describe people of any sexual orientation or sex. However, it has a broader definition. It can include people of either sex who are attracted to other people.
In addition to heterosexual men, the term also includes lesbians, isexuals, and transgender people. While it's true that gender is a social construct, it's a useful tool for understanding gay cultures.
There are many studies about how homosexuality develops.