I think the two views are not incompatible, yes marriage is ordained by God, but when government gets involved and requires a license among other things, then it becomes a contract that helps in determining how the assets and children are dealt with in the event of divorce
And these days, the man is the only one obligated to perform to the terms of the contact, which provides very profitable rewards to the one one chooses to default on them. Just take a long hard look at any “family” court.
It's more of a recording device. Records are important in the event that marriages are contested.