Is marriage anything more than a contract, a legal agreement, between two people?
When did the relationship of marriage get separated from the institution? When did it become an institution?
It's much more than a contract. Its institution dates back to Adam & Eve.
Marriage is an allegory of Christ's love for the Church.
The husband is to love the wife as Christ loves the Church (believer).
A husband sacrifices for his wife, even to the point of giving his life. This isn't just TV drama, it happens in real life scenarios.
Marriage calls us to do things which are un-natural; to act benevolently, to restrain our desires, and harness our tendency towards selfishness.
Marriage also creates the most stable environment in which to foster the spiritual and physical welfare of children.
In a tradidional two-parent household, children experience the duality of God's personality; authority, justice and power from the father; and mercy, kindness, and love from mom. Together these attributes express God's character more completely than in a single parent household.
I know... I can hear the boneheads coming up with a myriad of exceptions, but I'm talking in "generalities" here; the way marriage is supposed to work.
Marriage fails to the extent in which we fail to reflect God.
All this to simply say that God's purpose in marriage, is to reveal himself to us in the realities of the relationship.