Please read Federalist 46. Madison explicitly argues that the right to bear arms is reserved for several purposes, one of which is to prevent the encroachment of the federal gov’t on states and local polities. Madison specifically indicates a tension between militias and federal gov’t forces.
2A, in the minds of the Founders, was to repel any monarch or tyrant, to explicitly include any agent of the federal gov’t.