The states just defeated a standing British Army. The states wanted a way to regulate the Federal militia. The best way to regulate the need for a standing army is to have all the citizens armed, wether or not they are part of a state militia was not the point. When all citizens are armed than you contain and control and regulate a standing federal army from ever subjugating the people.
No, the militia were always meant to be a state-level organized body of people with arms who could be pressed into federal service during an emergency. While in federal service, they would still be under the officers appointed by the states, except for the Commander-in-Chief.
Why does the second amendment begin with "...being necessary to a free state..." and not a "free nation?"
It's because the states were the sovereign governments that delegated limited powers to the federal government, one of them being a standing army that was funded for only two years at a time to prevent a despot from abusing it. The states kept the militia to themselves to as a second check on the federal standing army in order to keep the states free.
-PJ