In fact, there is a pretty good circumstantial case to be made that the true (but unspoken) purpose of the amendment was to guarantee the slave states the ability to forcibly suppress slave rebellions.
https://www.nytimes.com/2018/05/24/opinion/second-amendment-...