That might be a good theory as to why marriage has developed and is a near universal social convention, but that's nothing to do with its legal status.
It's a given that it is a common social convention. The existence of marriage precedes laws about marriage. The laws are there to recognize the convention and convey certain legal rights to it, which do not have to do with promoting children.
Two hetero people that choose to get married and have no intention of ever having children are just as legally married as anyone else.
If gays shouldn't get married because they can't have children, then sterile couples shouldn't get married for the same reason. Nobody thinks that, because nobody really believes marriage is just about children.
Marriage is the union of two people because those two people choose to bind themselves to each other. Humans are natural social creatures, and in most societies tend to form long-term monogamous relationships. The institution of marriage flows from that, not from children.
I agree that there should be no "right" to marriage, for anyone. Marriage is a social convention, and if society chooses to recognize marriage with a formal legal status, that is fine.
By the same token, if marriage between gays became an accepted social convention there is no rational reason why the law shouldn't recognize that too.
I agree that it shouldn't be imposed by judges. It is purely up to society to choose what to recognize. In a democracy like ours that means it should be up to the voters to decide, and they have spoken. But it is difficult to see a rational reason why gays shouldn't be as able to get married as anyone else. It's only a matter of tradition.
"Tradition" is a value neutral word, like "change". It can be good, it can be bad, but it is not a reason.
re-read what you wrote- I see where I maybe have not been clear , I apologize- one thing you said crystallized it for me
“Two hetero people that choose to get married and have no intention of ever having children are just as legally married as anyone else”
Absolutely, because they COULD have children. That’s my point- heterosexual relationships CAN result in children- so contingencies must be made so there is a stable family unit to deal with that potential outcome. Gay couples WILL NOT have children ( barring in vitro fertilization or other recently developed technologies) so there is no purpose to sanctioning marriage, nor in providing them with any preferential status or privileges,
“If gays shouldn’t get married because they can’t have children, then sterile couples shouldn’t get married for the same reason”
Most sterile couples don’t know that fact when they get married. Sterility may not be permanent- the potential is always there fr a child o be conceived,in the immortal words of Jeff Goldblum. “life finds a way”
And they can adopt- because they have a family unit ready for children.