These laws come from DC and the states have lost a lot of the power they had initially. The federal government had a list of powers. They call them the enumerated powers. The states had everything else.
And the citizens could leave a state if they didn't like it. A lot easier to do than leaving the country.
Which is why local laws are not really that oppressive, even if they are. But federal law is all encompassing and difficult for you to influence. They can pretty much ignore the individual and usually do, except when they need something to grandstand about.
However, if a law is passed at the federal level, you're pretty much stuck with it. With local (or hyper-local like HOAs) you can vote with your feet by moving.