There are many laws that relate to marriage. Actually, a legal contract would be much more difficult to get out of than a marriage.
That might just not be a bad thing.