Human beings are biologically programmed to reproduce a certain way, and to develop a specific kind of relationship in order to nurture the offspring.
Marriage is an umbrella term for the many customs and laws that have evolved to protect that relationship. Whether one wants to consider secular laws or religious customs (which were not always separate), the basis of marriage is still the biological imperative.
In the legal system, there are a lot of laws regarding the children. What happens if one parent dies? If both die? What becomes of the children? What happens to property the parents owned if the children who should inherit the property are too young to legally do so? Etc.
I have never seen people who would like to see government get out of marriage and designate marriage as a purely religious institution explain how these issues would be handled in the absence of the legal marriage contract.
Nor have I ever seen the “gay marriage” advocates, including those on the Supreme Court who declared that “gay marriage” is a thing, explain exactly what “gay marriage” is supposed to be, and how it fits into existing marriage law pertaining to children and inheritance. (Do gays really need a pseudo-marriage certificate to leave their property to their favorite partner?)
I’m addressing one paragraph of your post. What happens if one dies? Do the children not have another parent listed on their birth certificate?
What if both die?
What if there’s property? That’s what a will is for, that answers both these silly questions