You are right that there is a great difference between science and law. In science, if an experiment keeps yielding ridiculous results, it is regarded as a failure and is therefore null and void. Not so in law in which there is such a worship of procedure, that the results are actually irrelevant as long as "procedure" was followed! Legal people tend to be "Procedure Nazis."
But laws do change. Slavery was once legal; it is not legal now. Abortion was once illegal; it is legal now.
Really? When did the Congress or any of the State legislatures pass a law legalizing it? Last I heard it was a collection of jackasses that made up a bunch of phoney bullsh*t regarding the 14th amendment, and then declared laws against it void.
You may regard this as an imprimatur of legitimacy, but from my perspective this is anything but. It is a case where a nation that was very much against something, out of respect for the institution of law, tolerated the edict of Authoritarian judges shoving something down their throats against their will.
The court soiled themselves with that ruling. (among others.) Even when they revisited it back in the 90s, the best justification they could come up with was "because we say so." (Stare Decisis) Even Liberal legal critics regard it as bad precedent and bad law.
One may disagree with that decision. But it is the law, and I am able to state that it is the law with absolute assurance without having to take any position on whether I feel that law is a good or a bad thing.
It is not the law. It is judges opinions which has come to be accepted as the ruling edict of today. People CALL it "the law." But it was not duly enacted by the consent of the governed. That people accepted it does not make it legitimate.
The Nazis made laws about Jews. The fact that they could do so did not make their laws legitimate, as they eventually found out.