> The Second Amendment protects an individual right to possess a firearm unconnected with service in a militia... [2]
The Constitution encodes a value judgement about the rights it protects; these rights are presumed to be protected unless it can be shown why they aren't in some specific case. That is to say, to ask someone "how [their] right contribute[s] to the security of the state" is wrongheaded - if you wish to deprive them of their right you must first meet strict scrutiny.
[1] https://en.wikipedia.org/wiki/District_of_Columbia_v._Heller