So who were these militias in need of regulation? In the South, they were called "slave patrols," and they were paramilitary groups that regularly patrolled slave plantations to make sure restive slaves weren't going to rise up against their white overlords. Remember the line in the movie "Django Unchained"? Leonardo DiCaprio wonders: "Why don't they just rise up and kill the whites?" It was a real question, and the answer was that "well-regulated militias" in the Southern states kept the slaves in check.
Patrick Henry, George Mason and James Madison knew, as they considered the Second Amendment, that it would be essential if they hoped to get the Southern states to ratify the brand-new U.S. Constitution. It was designed to keep these states on board.