Unless the government disapproves, like if your partner is the same sex, or if you are in a polyamorous relationship with more than one partner. Then the government says, "No, your relationship is not legitimate, and you don't have the right to designate your own rights without monstrous cost and time, and even then, we might still deny you."
And back in the day, they did the same thing to interracial couples.
Having marriage as a legal institution which controls your ability to assign certain rights guarantees that there will be unfair discrimination. It also invalidates the individual's rights because they can only use them in certain circumstances.
Sometimes, but actually of more concern to me is that marriage is actually the main bar to assigning one's rights.
To take a small example, if you are married, you cannot redirect your 401k account to someone other than your spouse without your spouse's approval. Why does your spouse pull rank on who gets your money?
Apart from the institution just being flat-out bigoted, one of the reasons I will never marry is because it threatens my intellectual property rights, as a writer.