Two out of three work, though.
I think the second phrase is a participle phrase modifying the first. So I'd break it down into two sentences.
A well regulated Militia, being necessary to the security of a free State, shall not be infringed.
The right of the people to keep and bear Arms shall not be infringed.
If this is what the writers intended then the grammar could be fixed by adding "and" after the second comma.
I still don't see an advantage of purposely injecting ambiguity when writing a document expressly created to limit (corral), federal government power and prevent abuse.
I agree.