It's kind of a weird tradition, to own a gun just incase the government fucks up to bad.
Back from when the army was just a bunch of dudes with guns.
You have to remember that when the country was set up, there were very few republics that had succeeded on a large scale without going bad. The Roman republic grew into an oppressive empire, they had just fought a war against Britain, which is where their tradition of representative government came from, because they felt stepped on, and most of the handful of other attempts at republicanism had devolved into anarchy or resulted in prosperous nations that fell to the first conqueror to come sniffing around. Giving individuals a check against the government, and a defense against foreign foes that didn't depend on a corruptible beauracracy, made excellent sense at the time, particularly since there was still an omnipresent war, on a small scale, with the Indian tribes to the west of the new nation, particularly when Britain wanted to give them a distraction.
In a very real sense, both concerns were vindicated by history. Just not in the US. Scores of idealistic revolutionary governments have gone bad, and had to be overthrown by the very people that put them in power, and the actions of United States Forces In Phillippenes, the French and Polish (I'm including the partisans from the western parts of the Soviet states in this as well) resistances, and the People's Liberation Army during WWII prove the amount of damage that can be done by a mostly-civilian force with light weapons to an invader. The Polish and other Eastern European partisans have been credited by some historians as winning the war on the Eastern front. Not sure I'd go that far, but the fact that it's even a plausible argument speaks volumes.
Though, there's that pesky bit before the comma that all the "right to bear arms" people leave off:
A well regulated militia being necessary to the security of a free state, the right of the people to keep and bear arms shall not be infringed.
As far as I can make out, you can't just drop the first half of the sentence and go "guns for everybody! Woohoo!". Funny how everyone forgets the first "well regulated militia" bit. As far as I can make out, this gives the individual states the right to regulate weapons as much as they want (since this is the federal constitution) - but state laws override federal gun laws (you could still have federal laws but they have to be ratified by the states).
Clearly in the above excerpt from the constitution, the "well regulated militia" is listed as the end goal, whereas the "right to bear arms" is listed as the means to that end. So we can go off what's clearly intended (well regulated state militias), or we can chop stuff out of context to get a personal agenda (every man and his dog with a small arsenal).