But its not so clear, which is why we have problems.
It should be amended to say:
"Being necessary for the security of the free state, the right of the people to bear arms shall not be infringed."
See how much more clear that is.
The problem is the comma is a punctuation error, If you look at the original wording of the 2A it read
The right of the people to keep and bear arms shall not be infringed
; a well armed and well regulated militia being the best security of a free country but no person religiously scrupulous of bearing arms shall be compelled to render military service in person.
As you can see the most important part is first, You can see the comma is in fact a semicolon.
Now if you take the 2A as written in the constitution you will see that the semicolon is changed to a comma implying 1 sentence. When in fact that is not the case, The semicolon is meant to separate the 2 sentences but give them equal position.
Rules for Using Semicolons. A semicolon is most commonly used to link (in a single sentence) two independent clauses that are closely related in thought. When a semicolon is used to join two or more ideas (parts) in a sentence, those ideas are then given equal position or rank.