Well, me and my partner can regulate our relationship however we like, and go through any ceremonies we want. It’s nobody’s business but ours.
However, when we want society at large to recognise and accept our relationship, we have to do so on terms which are acceptable not just to us but to the rest of society. That’s where marriage comes in.
The terms on which our relationship is recognised and accepted will, of course, vary from society to society. Most western societies require that our relationship be exclusive (i.e. that as long as we stay married to one another, we can’t marry anyone else), that it be heterosexual, that it be publicly celebrated or registered so that everyone knows we’re marrried, and so forth. We usually have to accept mutual legal obligations, e.g. to support one another financially, in return for which we get financial or tax recognition, e.g. exemptions on inheritance tax for property passing to a spouse. And so forth.
The terms on which society recognises a marriage can vary not only from place to place, but from time to time. Divorce laws may be introduced or revised. Homosexual couples may be allowed to marry. Polygamous and polyandrous marriages may be recognised, or have recognition withdrawn. And so forth. Generally this is (and, I think, should be) done in response to social changes.
In one sense, marriage frequently becomes outmoded. The particular features and consequence of marriage may need to be overhauled to reflect social changes. But it another sense, I doubt that marriage will ever become outmoded, in that I doubt we will ever reach a stage where we dispense entirely with social, legal and practical recognition of a conjugal relationship by society at large. Conjugal relationships are a signficant feature of most societies and, indeed, among the most important aspects of most people’s lives. Trying to construct a society which, legally and practically, ignores there existence would be even sillier than ignoring the existence of relationships like employment, or landlord and tenant, or buyer and seller.
As a practical matter, society must offer some formal legal recognition to conjugal relationships. That’s marriage.