You're assuming that marriage is fundamentally about producing children, but marriage is also a legal institution that recognizes a committed relationship and gives couples specific rights and responsibilities. Opposite sex couples who are infertile, elderly, or choose not to have children can still marry, so reproduction clearly isn't a requirement for marriage. And saying that recognizing same sex marriage means we have no principled reason to reject plural marriage doesn't follow, because the government can distinguish between two consenting spouses and arrangements involving multiple spouses based on legal consent, rights, and responsibilities. Finally, hospital visits and inheritance aren't substitutes for marriage because marriage provides a broader legal status and set of protections. If the state can recognize marriage for couples who cannot or do not reproduce, excluding two consenting adults solely because they're the same sex requires a separate justification.