The point of the second amendment was, in no small part, so that the central government wouldn't deny the states the means to commit genocide against the indigenous population on their own, because the states didn't trust he central government to be sufficiently enthusiastic about it. That was the major security concern alluded to by the “necessary to the security of a free state” bit.