Decision extract:

The Amendment's prefatory clause announces a purpose, but does not limit or expand the scope of the second part, the operative clause

Apart from recognizing the right is not predicated on a militia, in this sentence from the decision, there is a recognition that the militia is not necessarily the only purpose for the right. It specifies “a purpose” and not “the purpose”.