According to what I have read, this has been happening because every United States state is also a sovereign and independent entity in its own right and is granted the power to create and apply laws, and regulate them according to their needs. In addition, some laws, such as certain voting laws and criminal laws and statutes, tend to be somewhat uniform across states; nevertheless, some areas of law can be very, very different from one state to the next.
Canada is the country that forms most of the Northern border of the United States. I recommend looking at the map and seeing what is directly above the 48 contiguous states.