Why legislate marriage at all? Keep your government out of my personal relationship.
At first blush I agree with your sentiment, however upon closer look it is clear why marriage is and will continue to be a legal compact defined by the State. There are literally thousands of federal and state laws that refer to married people or marriage agreements. Additionally there are thousands more Administrative procedures and rules relating to marriage.
We have a population that contains many subsets of people who are uneducated and or unintelligent, but still have children and love relationships. A set of rules that prescribe marriage rights and duties protect these people and their children. We don't force people to get married, but the government does give certain rights to those who do, and even if they don't know or understand all the protections the marriage provides them, they know they are entering into a legal relationship with the other person.
People can enter into altered marriage agreements, that is, they can have pre-post nuptial agreements, but the vast majority of the population cant afford to have a lawyer draw up all aspects of their relationship, and thus they simply get married.
We have an entire social structure built upon the legal protections offered by what is "marriage". That structure is constantly changing, and the law clearly evolves. You cant simply cut the legal marriage out of this system and tell people to draw up there own agreements, that might be where we are heading, but it would take decades of legal evolution to get there.