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.