Another way of explaining it.In modern times,we have the DCM and CMP as examples.It us beneficial to have a population of the PEOPLE skilled with arms in case the security of the free state has the "drop the hoe and grab the rifle" need.
A competent militia is drawn from a population of THE PEOPLE who keep and bear arms.
George Washington had to get help from Von Steuben,Von Steuben's Regulations.
I'm not a legal scholar,but I look at a "well regulated"set of duelling pistols,"regulating" the barrels of a double rifle,and "regulating" the .50 cal guns on a P-51 Mustang,or "regulating "the guns of an artillery battery to find a meaning in context with ARMS rather than the agenda of a government increasing its power.
And,while I'm sure legal scholars would dismiss me,I read "free state"as a state of being.
A well regulated militia being necessary for a state of being free.
It might be reasonable to consider the founders were writing a document to preserve the state of being free,and they clearly were not writing a document to give the State power over the People.