The 2nd Amendment guarantees the right to own and bear arms - for recreation and personal protection, the Supreme Court now says, an opinion penned by Anton Scalia. However, the original intent was to provide a resource for State militias, regulated and controlled by those States, in order to contribute to a National Army when needed. Neither of those rationales are true any longer. First of all, the US maintains a standing military force, rendering the need for state militias moot. Since there is no longer any need for state militias to provide soldiers, the Court had to come up with the rationales of, one, recreation and, two, self protection, despite the fact that neither is mentioned in the 2nd Amendment.
The notion of recreational use of guns has always been assumed, as most people used shotguns and squirrel rifles for hunting in the early days of the Republic and brought those same guns when called upon by their states to form militias for Indian uprisings, emergencies, etc. Indeed, many southern states were unable to arm their early volunteers from lack of a decent arms industry and had to rely upon a volunteer's personal weapons to fill out their ranks with something other than pikes and axes, in the first year of the Civil War. As the war progressed the arms industry caught up with the needs of the various armies and provided rifled muskets that were becoming common throughout the world. However - and this is important - after the war, none of these weapons were allowed to be kept by discharged soldiers. They were only allowed to keep their original hunting guns and sidearms for officers. This prohibition of keeping military weapons out of the hands of discharged soldiers has been in effect ever since that time. There was a simple reason for that prohibition: the national government wanted to eliminate the possibility of another Civil War or any other uprising that could tear the country apart again.
Of course, by the end of the war the gun industry had grown so much that maintaining that market share through private purchase to replace the large government contracts it was going to lose become paramount in their plans. Guns and rifles were produced for protection against Indians and outlaws in the West and against gangs formed by and against immigrants in the urban centers of the East. It became the goal of the gun industry to promote the idea of self protection and continuing conflicts between various groups in order to keep gun sales growing. And the government still bought weapons, of course. Weapons for the Indian Wars, smaller wars for expansion in the Pacific that culminated against the Spanish Empire, and for protection of borders and for the use of various police agencies throughout the country.
Ironically, the notion of self protection against that same peace keeping government, gained increasing currency after the Civil Rights movement when increasing numbers of radical conservatives and white racists began accumulating military style weapons to protect themselves against what they viewed as the encroachment of tyrannical governments imposing its views upon their lives. It was no longer the belief that government would protect people against criminals and other potential foreign enemies. It became the belief that government, itself, was the enemy. It hardly matters whether this view is true or not, it only matters that some people believe it is true. As various groups like the Aryan Nation and older groups like the KKK regained popularity they began to accumulate weapons for protection against an imagined tyranny or worse, a race war, or both. Those sentiments have now metastasized to include anti-gay groups, anti-immigrant groups, and radical religious groups expecting a coming Apocalypse.
It's only a small step in logic to combine the two reasons of recreation and self protection to rationalize owning not just squirrel rifles and shotguns but military style weapons whose only purpose is to kill other human beings and create mayhem on a scale that threatens the security of local and state governments. These are clearly offensive weapons designed for war and insurrection. The nature of these weapons pose a direct threat to the national government since they can be used effectively in military styled attacks against a civilian target in order to cause mayhem and disorder. It is the government's responsibility to protect its citizens from attack, to maintain order and to preserve a social system that benefits all and not just a few. Therefore, a ban on military style weapons protects not only the public welfare but is also a prudent defense against insurrection.
And if any doubt that insurrection and rebellion do not pose a threat remember that this country was torn apart in civil war in the mid 19th century, and its effects still linger in bigotry and racism throughout the nation. Weapons control is imperative to preserving our national integrity and furthering public safety.
The rationale that the 2nd Amendment protects an imagined right of the people to kill other people and throw parts of the country into chaos is now what underlies the belief that ownership of all weapons should be protected by the Constitution and any use of those weapons is justified, no matter the consequences to security, other peoples' liberties, and social order. Its reductio ad absurdum justifies every negative consequence in the pursuit of one right.
In other words, and to paraphrase Abraham Lincoln: "Shall all the laws, but one, go unenforced and the government, itself, go to pieces, so that one law be preserved?"