I believe it was ordained by God.
Nevertheless ... whether or not it is ordained by God, marriage has also been a legal/government matter for a very, very long time, in pretty much every culture.
That's just the nature of the beast. Why does it bother you so much?
I’m going to get married next year, I’d like as little state involvement as possible. God, this might well be the only issue that I am stubbornly libertarian on. I have nailed down that there is no law against a traditional or “non-givernment sponsored wedding” but try finding a clergyman or woman that will perform the ceremony w/o the states permission to wed.....it isn’t easy.
My own Pastor is not comfortable with the idea of just performing the ceremony without the state giving it’s permission....I asked him if he’d require permission to perform communion and he just kind of chuckled.