Probably on the grounds that the Alabama State Constitutions allows for it. Given what I've read about the Alabama Constitution, it's quite likely, as there are a massive number of very specific Amendments to it.
In the absence of a U.S. Constitution word on the matter, the states, via their constitutions, can generally do whatever they want to.
Anything not spelled out at the federal level is left to the states to determine but what is it that gives the state that power over people's lives? Just because it says so?