Interesting question.
I believe it is due to a gradual change in what should be punished in regard to personal behavior.
Cal it shifting social moray or whatever.
We have come a long way since the Salem trials. Many seem to think too far. In some ways I believe we have.
But that doesn't change the Constitution. If this "gradual change in what should be punished" doesn't manifest itself in the form of a constitutional amendment, then the Constitution hasn't changed.
Evidently this gradual change hasn't occurred in Texas, or they simply would have repealed the law on their own.