The understanding of the fundamental right to travel goes all the way back to the original Articles of Confederation which explicitly upheld the people’s right to travel within and between states, saying in Article 4:
… the people of each state shall have free ingress and regress to and from any other state, and shall enjoy therein all the privileges of trade and commerce, subject to the same duties, impositions and restrictions as the inhabitants thereof respectively—
When the US Constitution was drawn up, the Founders felt this right was so implicitly obvious it didn’t need to be enumerated; instead, a number of Supreme Court rulings have reinforced the implicit existence of that right. The most recent was probably United States v. Guest (1966), which included an interpretation of the 14th Amendment that citizens hold a constitutional right to travel from state to state, and there were other similar rulings long before that one.
How do you square the Constitution with lunatic laws that attempt to criminalize interstate travel by law-abiding US citizens just because, say, the Texas legislature doesn’t like those people’s reasons for such travel? If the Supreme Court were to try to support the constitutionality of such a law, they’d have to overturn decades of precedent and would be seen as outrageously activist. It would be legitimizing the state’s ability to charge someone with criminal conspiracy to commit a perfectly legal act.