Because the institution, historically speaking, has been between people of different genders. It is only recently that people have even considered allowing same-sex marriages. It certainly wasn't considered or was part of the intent of the 14th amendment, when it was added to the constitution.
If you want to add a law to consider prohibiting same-sex marriage as discriminatory, then go through the process to add a law through the legislative process. Changing the meaning and intent of the current laws through the judicial process seems like the wrong way to go about it. It just isn't currently part of the constitution.
Why does the history of the thing have any bearing on whether something is sex discrimination?
It seems quite obvious to me: if a man is legally permitted to do X, and a woman is not, purely because she's a woman, then that's sex discrimination. It doesn't matter what X is or how much history there is around it.
If you want to argue that the 14th Amendment was not intended to prevent sex discrimination in marriage, I'm right there with you. But I don't see how you can argue that requiring marriage to be one man and one woman is not sex discrimination.
I mostly meant within the context of the current law and the historical understanding that marriage was only between a man and a woman when the 14th amendment was added. In my opinion, the constitution, as it currently stands, doesn't consider prohibiting same-sex marriage to be gender-based discrimination.
Seems to me that the question of whether denying same-sex marriage is sex discrimination lies outside of law, and the law's purpose is simply to discuss which forms of discrimination are legal. I would say that at the time the 14th Amendment was written, it would have assumed that sex discrimination in the context of who can get married was allowed, not that it didn't consider it to be discrimination in the first place. But that's really just splitting hairs.
I think the important bits are: the 14th Amendment wouldn't have been considered to allow this when it was written, but now it is.