In those kinds of instances, state laws are attempting to circumvent federal rights, which isn't constitutional, of course.
Some of this has been playing out since 1789. We are, still, if anyone wants to be honest about it, two different countries in thought and ideals. I agree with the idea that federal laws should outline more fully in contemporary terms all the basic rights that people should have, so that the states can instead focus on individual infrastructure. That is why I am voting as I am next month; we have the Supreme Court to consider.
I don't think most of those state legislatures will be in the grips of religion for much longer, except in a few holdouts where it's always been much stronger than everywhere else.