Look, the State defines marriage because the State as a vested interest in it (it leads to an orderly society with rights and priviledges, not the least of which are inheritance laws). The State is (mostly) the modern body that enforces contractual law (this is where I've talked about competing law systems that are already in effect in the US concerning the argument over including Sharia into the mix). In all contract law, the ultimate arbiter is the State (this is why many of the contracts that most people encounter daily include "binding arbitration" clauses, so as to avoid judicial review).
Just so you know, in many communities of this country, when people have a contract dispute (property, responsibilities, obligations, payment, family, etc) the first stop of the complaintents isn't the courts, it is their local religious body. Sometimes, people will take their case to their elected officials for adjudication (mayors, and even, God forbid, councilmen). Sometimes people just ask a police officer to help. However, when all else fails, there's the judiciary.
People like to quibble about the words, marriage, union, civic, common law, etc. Well, here's the thing, there are thousands of laws that include the word, "marriage" (or married) that give specific rights. The laws and regulations regarding access in hospitals is one such things. There is no recognition for "civil union" or in many cases even "common law", however spouses (defined by "marriage") and family are covered. And there are, like I said, thousands of such things (laws, procedures, rules, etc). It's still allowable (IIRC) for hotels and motels to not give a single room to unmarried or unrelated couples. At one convention I went to with a friend (another male), we were going to share a room. When we checked in we were "upgraded" to two rooms. Not that I really cared (they were charging us only the cost of one of the rooms), but it was pretty much because we were two guys checking in together. When Bette has been in the hospital, I was able to stay with her for much longer than "normal visiting hours" because I was her husband (which I claimed even before we were actually married, and I was never challenged on it). This is why "civil unions" are not a replacement for "marriage" or it's equal.
Now to the argument about "the state shouldn't be involved in marriage." This is a false argument. No, really, it is. Marriage is a contract. As a society we pile a lot of other contextual stuff on top of it (commitment, solemnization, love, relationship, caring, etc). While we hope a marriage would have those things, they aren't required. Because marriage is a contract. There are "loveless" marriage, marriages of convenience, economic marriages, political marriages, etc ad nauseum. All of those don't have all that cultural traipsing layered on top. Historically, marriage was about transfer of property (sometimes including the woman as a part of that property, being transfer from the father/guardian to the husband). Marriage creates and complicates the priority of claims. That is, unless it's stated in a pre-nuptial or other document, if you're married and your spouse dies, no matter what the Will says, you have a claim on all property and chattels. You may have to sue for it, but that's what probate court is all about.
Now, you can be married in the eyes of the church, or married according to the state, or both. But guess which one is legally enforceable? As it stands now, no church is forced to recognize a marriage (although the church I grew up in recognizes that Bette and I are married, because they're good people, for many churches we would not be considered married), let alone solemnize it. However, the church is not allowed to solemnize marriages until the religious leader is approved and registered by the state (not an onerous process, and one that many people not affiliated with a traditional "church" have done). This isn't the case for mayors, clerks of court, and ship captains who, by their office, are allowed to solemnize marriages (IIRC, YMMV).
So, when you hear people talk about how marriage has never been or shouldn't be a function of the state, understand that those people are speaking out of their neither regions. Hell, it hasn't been that long since you had to get blood tests (in many states) to check your compatibility before you were allowed to marry. There are many laws about who can and whom can't be married (if that wasn't the case, we wouldn't be having these legal contortions in the first place). Also, non-religious and non-judeo/christian/muslim people can be married. If marriage was solely the providence of the church, that wouldn't happen and you'd have to exclude those people. The church is only involved these days because of the historical fact that the church was the state for a long time. It was the arm of the state that reached deep into the society and into all locals (which for a long time the state couldn't do and had no interest in doing). They liked to cement and insist on their franchise by creating the fiction of "in the eyes of God" (of which they were the sole arbiters).
There's a whole lot more (like the "marriage is for children" and "why is marriage a church ceremony then") crap being thrown around, but I think this is long enough as it is.