The existence or not of a valid marriage affects the rights of persons other than the two who are married. For example, if a piece of real estate was taken as tenants by the entireties and the couple who bought it was not, in fact, legally married and one dies, the children of that decedent might have a valid claim to a portion of the property. If I own an insurance company and you wish to enroll a "significant other", I need more proof of the relationship's beginning date and ending date than a "I took them off my facebook friends list" would provide.
I could go on and on. Point is, society at large has a need for formalized, ascertainable relationships between members of a family, especially partners in a marriage.