The reason is to explain why the right of the people to keep and bear arms shall not be infringed - because a well-regulated (properly-functioning) militia is necessary to the security of a Free State.
How "Free" are we if the government can throw us in jail for merely possessing the same arms used by our standing army?
The above is the reasoning used in a number of lower federal court rulings.
The right of individual citizens of a state to possess the same arms used by our standing army, organized into a well regulated militia, is necessary to the security of a free state. Which is why the federal government may not infringe on that right.
That says nothing about your personal use of some type of weapon for any other purpose. That would be covered and protected by your state constitution.