If one is familiar with the history of marriage, contemporary debates over marriage can be a bit odd. The Church got into marriage law because there was pressure (particularly from landholders) to regularise marriage rights and law to help smooth transfer of property. There is a transaction costs argument in favour of a standard contract that I suspect would recur rapidly if marriage was "disestablished" (i.e., the state withdrew from regulating marriage: which it only got into in Latin Christendom during the Reformation).
The notion that marriage "has to be" sacralised is also deeply odd. In Latin Christendom, marriage did not become a sacrament until the C11th. The Catholic Church did not require the presence of a priest until the Council of Trent in the C16th. But contractual marriage is, in fact, older in Western traditions (in Judaism, Roman, Celtic and Germanic law).
The notion that the Church has "intellectual property (IP)" in marriage is simply stupid, showing a crass ignorance about the history of marriage. But it is consistent with the pattern of social movements vis-à-vis the family: they start off being against it as distraction from the Great Purpose, make some sort of accord with it when social reality proves too strong and end up claiming that they were always in favour of it really.
The only thing anthropologists have been able to find that is common and distinctive about marriage—it creates in-laws. There has been at least one society (in Southern China) that did not have marriage at all (a woman’s brothers helped raised her children) and many societies (notably Amerindian societies, but African, Asian and Middle Eastern ones as well) have had same-sex marriages of various types.
As for its origins, that is not remotely tied to any particular religion. Indeed, religions typically seek authority from supporting and ritualising marriage, rather than marriage requiring religious authority. Marriage itself has origins in human needs and conveniences. In Stephanie Coontz's —words:
... having a flexible, gender-based division of labor within a mated pair was an important tool of human survival.Children, property and companionship sustain marriage as an institution: so much so that any two of them seem to be enough to keep it going.
ADDENDA: The Israeli state has no role in marriage except registering the marriage, which has it own problems given marriage is treated as an entirely religious institution. (The Israeli state does enforce some residency restrictions however.)