There are many reasons why the militia was thought to be necessary to the security of a free state. See 3 Story §1890. First, of course, it is useful in repelling invasions and suppressing insurrections. Second, it renders large standing armies unnecessaryan argument that Alexander Hamilton made in favor of federal control over the militia. The Federalist No. 29, pp. 226, 227 (B. Wright ed. 1961) (A. Hamilton). Third, when the able-bodied men of a nation are trained in arms and organized, they are better able to resist tyranny.
3. Relationship between Prefatory Clause and Operative Clause We reach the question, then: Does the preface fit with an operative clause that creates an individual right to keep and bear arms? It fits perfectly, once one knows the history that the founding generation knew and that we have described above. That history showed that the way tyrants had eliminated a militia consisting of all the able bodied men was not by banning the militia but simply by taking away the peoples arms, enabling a select militia or standing army to suppress political opponents. This is what had occurred in England that prompted codification of the right to have arms in the English Bill of Rights. The debate with respect to the right to keep and bear arms, as with other guarantees in the Bill of Rights, was not over whether it was desirable (all agreed that it was) but over whether it needed to be codified in the Constitution.
During the 1788 ratification debates, the fear that the federal government would disarm the people in order to impose rule through a standing army or select militia was pervasive in Antifederalist rhetoric.
Sometimes you just have to take what you can get. The rest will fall in later.