@Adirondackwannabe No, it wasn’t.
@SquirrelEStuff It doesn’t have to be, or at least it doesn’t have to be quite as involved as it is currently. Historically, the state got involved in the 16th century (about the same time that the church got involved, by the way). While the church got involved primarily for record-keeping purposes, the state got involved because marriage had become more and more like a contract, and mere social pressures had become less and less capable of enforcing marriage agreements. Marital disputes were coming to court, but there were no clear laws regarding marriage in order to decide the cases. And since there were very few formal contracts, there weren’t a lot of other resources to help decide the cases either. Thus marriage became formalized and civil marriage became a formal contract.
To answer your last question, though, the answer is actually no. Most of the benefits offered through marriage cannot be done through private contracts. This is because most of the modern benefits came about after marriage had become a government affair (and thus the laws used government-certified marriage as a prerequisite for the benefit). This is easily fixed, however. If the state were to get out of the marriage business (except for the contract-enforcing bit that started the governmental intervention in the first place), most of those benefits could easily be redefined as being available to people who form certain kinds of contracts.
As it turns out, the state has an interest in promoting marriage (or at least something marriage-like) insofar as it has various personal, political, and economic benefits, so it might not want to let you contract certain rights and privileges—such as jointly filed tax returns—out to just anyone. But it isn’t likely that we need the current level of government intervention to get any of those benefits. The logistics of restructuring the rights and privileges of marriage, however, is a whole other issue.