Many religions that disagree on many other things treat marriage as something sacred, not just a contract. Moreover, many non-religious people—though not all—have intuitions that point in that direction. Let's take all these intuitions at face value. Marriage is sacred.
Well, a paradigm of the uncontroversially sacred—something that we except to see connected to rituals across religions—is life. We are not surprised to see funerals or baptisms in a religion. Maybe at some deep level it is puzzling why human life is sacred (if materialism is true, this may be especially puzzling), but that human life is treated as sacred is not puzzling.
A student pointed out to me this morning that we can attempt to account for the sacredness of marriage by pointing to the sacredness of the new joint life of the couple. They become one flesh after all. Indeed, it is as if a new human life came into existence. And if the analogy is tight enough, that makes sense of its as being sacred.
But while I think this is all true, I suspect that the reason why marriage has been so widely treated as sacred may be a more literal connection to new life: it is a relationship tied to literal new human life, to procreation. Literal new human life is sacred. The sacred infects what is related to it. The message of a book is sacred, so the volume it's in is treated as a holy book. Marriage, on this picture, is tied to procreation.
But of course we and our ancestors know that not every marriage results in procreation and that procreation can happen outside of marriage. So the tie between marriage and procreation has to be carefully formulated. I don't think we want to say it's just a statistical tie. That would undermine the reason for taking marriage to be sacred. Rather, I suspect it's a normative tie. There is more than one way one could expand on this tie.
One option is to say that marriage is a relationship that normally results in children. One would expect a relationship that normally results in something sacred to have something sacred about it.
However, this option has the consequence that a marriage without children is lacking something normal to it, like a three-legged sheep lacks a leg. But is it right to say that a couple who got married in their 60s has a defective relationship? Well, the phrase "defective relationship" leads astray. It suggests that there is something wrong with what the people are doing. And in that sense, the couple who got married in their 60s don't have a defective relationship just because they don't have children. But if we think of it as a defect in the same way that a sheep having three legs is a defect, then that phrase may not be incorrect. A couple who gets married late in life may well have a quite appropriate sadness that they were unable share a larger portion of their life, and in particular a sadness that they were unable to share their fertility. So I don't think the case of elderly couples is a serious problem for the view that the tie between marriage and procreation is that children normally result from marriage. And the view explains why it can feel so tragic to be infertile.
Another option would be that marriage is a relationship that makes having children morally permissible. It is a relationship that licenses procreation. One shouldn't here have a picture of the state or the church giving one a license to procreate: marriage comes from an exchange of vows between the future spouses, and it is their giving themselves in marriage to one another—something that in principle can happen without a state or a church being involved—is what morally licenses the procreation on this view. It is only with the kind of commitment that is found in marriage that a couple could permissibly tie themselves to each other by having a child together. But it makes some sense that taking up the commitment which makes the production of human life permissible would be infected with the sacredness of human life. Still, in the end this doesn't seem quite to get the full story. For instance, if a married unemployed couple is so poor that they cannot adequately care for their children, then it could be morally impermissible for them to procreate. Getting a job could then render procreation morally permissible. But that doesn't make the job be a sacred thing, at least not in the way marriage is.
In the end, I suspect that all three stories—the story of the new joint life of the couple, of marriage normally resulting in children, and of marriage in principle morally permitting a couple to have children—are a part of the truth. And, as a colleague reminded me, there is the mirroring of the life of the Trinity.