It might not be what you think. From Stephanie Coontz’ book Marriage, a History: How Love Conquered Marriage (p. 31):
“Probably the single most important function of marriage through most of history, although it is almost completely eclipsed today, was its role in establishing cooperative relationships between families and communities.”
A few pages later, she adds that marriage has historically fulfilled a variety of functions in different societies, so much so that it’s hard to pin down exactly what marriage is. These functions also occur in different combinations, which could alternatively be performed by other institutions. The exception, according to Coontz, is not reproduction or even love, but the extended ties created through in-laws. Here is the whole quote: