It goes back to the beginning of history and exists in every culture as a rite for legitimizing heterosexuality, period. It has included polygamy, wrongly, but it has never legitimized anything but heterosexual sex.
Marriage legitimizes heterosexuality? Period? Meaning that it's sole function is to legitimize a sexual orientation? What are you smoking? If I weren't a total non smoker for 15 years now I probably ask you for a hit
Marriage legitimizes kinship relationships. Humans and all animals can breed heterosexually with or without legitimizing heterosexuality. But the families and kinship systems of human societies have formal requirements. The primitive institution of marriage recognizes a relationship between families and the man and woman and then their offspring are the medium through which that relationship is realized, with responsibilities and duties.
I know you will deny any archeology, anthropology, and history that isn't in the Bible so their is no point even talking to you about what we have evidence for.
lfen