Not sure what you are getting at....is it some ethical or moral thing? Laws don't have to based on anything.
Laws are based on documents (such as the Constitution), morals, ethics, and so on.
Where does the state or federal government derive its power to even make laws? The Constitution. The federal gov't makes laws within their jurisdiction. All other laws are relegated to the states.
States have their own Constitutions.
Do any of these Constitutions include animal rights? Is the state required to protect the animals from torture or abuse based on the protections listed in the Constitution such as our Bill of Rights?
if not, then criminal laws must (1) not violate the applicable Constitutions, and (2) address a behavior or act that society deems criminal.
So, on what basis is animal torture considered criminal? Is it a moral basis? What makes humans, any human, believe the practice of torturing ones own pet is wrong?
Does religion grant the animals these rights? Common sense? Empathy?
Where does the desire/duty to protect these animals come from?