I think it starts with some arbitrary facts of biology, and develops with some historical facts about technology.

Humans take a very long time to develop so they can have big brains later, but they are not strongly monogamous. (And there are some cross-cultural commonalities like taboos on incest and sex with animals or dead bodies.)

In the brutish default state of things, human women pay a high biological and personal cost (and face significant risk) to get pregnant, bear children and (typically) take on the lion's share of childrearing. After ~18 years they are considered past their prime. And it is typical that they have less social power to begin with and are subject to issues such as rape.

So they are relatively much more vulnerable to hit-and-runs. Since everybody is related to women and probably cares about some of them, also because too many hit-and-runs hurt a society, there is a tendency to support protective measures such as socially recognized marriage. Especially in an environment of scarcity, like what people have normally faced.

It can also be argued that this has good benefits for men, many of whom really do like to settle down with less competition and fighting and maybe also raise some kids. There may be social benefits from supporting and developing men like this. They are more likely to build things and keep the law rather than joining roving rape bands (like you see in some other primate species).

So you also have a lot of arranged marriage, and not necessarily any romance. And if there is a pretty picture it is the one of civilization. Because reality is pretty grim and civilization is a big pile of techniques for managing that grimness most of the time.

Now in the industrialized world we have so much more than mere civilization, including a lot that bears directly on sex: birth control, low maternal and infant mortality, less scarcity, public schools, etc. And just plain fewer kids and more free time. So the risk and cost is both absolutely lower and somewhat more equal across genders. So the linchpins for support of a lot of traditional institutions are removed. And you see that sexual freedom increases naturally, not because of any principle, while opposition is really due to some principle or nostalgia more than any clear practical concern. And divorce is more acceptable and there is much more emphasis on having fun and fulfilling a pretty picture.

So the nature of relationships is greatly changed, more like a kind of romantic and economic partnership lasting 2-7 years. So many other changes too.

Now in this newer kind of relationship, it is really not at all hard for those same behaviors to map to homosexual relationships (which have always existed, just typically in different forms from traditional marriage) because so many of the differences have attenuated. And so many social groups give the same recognition to both and correctly recognize that it is not destroying society in any real or practical respect, except that some people are unhappy because of traditional ideas.

But we have strong taboos (with various practical and biological foundations) about things like childsex, animalsex and deadsex. Even if you are in support of those, they will not be accepted the same way ever. And the concept of a marriage commitment between a man and a corpse, or a man and a child he is raping, will never have parity with the concept of a long-term commitment between equals. And I strongly doubt that incest would ever be accepted outside of specific cultural forms.