That ancient social institution (which was actually different for every culture cited, or that ever existed) became a part of US Common Law with the adoption of the US Constitution. It's supposed hallowed history then ceases to give it, or any interpretation of it, any support under common law--it becomes one of the body of laws of our nation, and has to meet the same tests: is there a compelling governmental reason to have this law, and to implement it in this way? If the answer is yes, the law can stand; if no, it must be voided. And indeed, the SC historically looks down on legal interpretations from other nations, since they have nothing to do with our system of laws.
Four of the justices thought that there is a compelling governmental reason for states to discriminate against same-sex couples in the matter of marriage; Five found that argument unconvincing. Therefore, the law was voided.
We still have marriage; as it did historically in many cultures, and as it does presently in many nations and cultures, it now includes same-sex couples. So, it's a little different than it was a few days ago, and a few decades ago--but then, we already changed marriage to allow people of different races to marry, of different ethnicity, of different RELIGIONS...things that were found to have no legal basis, even if some believe there is a religious basis.