You say that as if the purpose doesn't matter.
No. I say that as someone noting that it's a bit of a circle to suggest that marriage is more than a contract because it's treated differently and then suggest that the difference is marriage.
Are you contending that married couples give the government as much of a benefit as corporations?
No. I don't know how you'd quantify that distinction. I'm saying that marriage is one sort of contract. That incorporation is another. That they both receive benefits and are treated differently, as befits their differing natures, but that only distinguishes between contract types. A man and a woman may marry without children or any religious inference and be bound by nothing more than the stated terms of their contract. This is the foundational truth here. Whatever else is added is just and entirely that, however important the person adding it may feel that addition to be, however indispensable to his moral mechanism.
So then, if the matter before us is contract, then to abridge any adult citizen's right to contract as freely as another is prima facie discriminatory practice and is bound to fail as a matter of law absent fairly high thresholds of justification. It may take time to overcome the inertia of established prejudice and to match the principle with the outcome, but it is inevitable. As inevitable as the failure of the segregated South, however deeply held the beliefs that sponsored it.
To hold this part is not, as some would have it, to support sin, but to support each man's right to his own conscience so far as the exercise thereof does not impinge on another's right.