The whole marriage/divorce thing is a artifact of history.
It comes out of a time when keeping the paperwork to figure out inheritance was difficult to put it mildly. So instead one put on a formal event before witnesses.
And because back then the line between government and religion was downright non-existing, the formal event was given a religious meaning.
And so we have the mess we are still dealing with today...