The gun nut crowd keeps their guns to protect against the tyranny of a government. The constitution gives them the right to keep guns to prevent the raise of a tyrannical government, they claim. They are right that we should all, wherever we live, fear the raise of a dictatorial government that is no longer responsive to the will and needs of the populace.
I will restrict this discussion to the US though.
The founders may (or may not) have envisioned an armed populace as a means of thwarting the raise of a dictatorship. However, they could never have foreseen the technological arms development that has gone on since that time. The weapons available to citizens can no longer stand up to modern militaries.
Fortunately, the founders saw the need for other mechanisms to protect the country they were creating.
One is the rule of law. For example, if part of the government decides that birth right citizenship is inconvenient for them it is protected by the constitution, the fundamental law of the country. Without this protection what ensures that a government can not remove anyone's citizenship? A bright shiny gun on your hips will not protect you from this.
If you have $5 dollars to donate to the politician you feel represents you but across town up on the hill someone has 10,000 times more money than you and can donate $50,000 just as easily what hope of having a government to represent you do you have? This risk to the fundamental idea of the democracy of the United States of America has been recognized by honest law makers with campaign finance laws. If these can be ignored your protection from effective disenfranchisement is gone. A bright, shiny gun on your hip will not protect you from this.
Another mechanism is the subordination of the military to the constitution of the US and the rule of law resulting. Without this the greatest power in the country is a risk to your freedom. A bright, shiny gun on your hip will not stop the juggernaut.
A third mechanism is the separation of the various branches of government. A independent judiciary is needed to make sure that all other parts of government are not allowed to interpret law for their own ends. If the judiciary is suborned to the desires of the government a bright, shiny gun on your hip will just be removed if it is convenient for those in power.
The founders understood that an capable, independent fifth estate (what we now call the media) is needed to allow for informed decisions by the citizenry. Without this you can not make an informed decision and your vote becomes worthless. A bright, shiny gun will not give you useful, true information.
The gun nuts are indeed correct. There is great risk to the government by and for the people. They are wrong in where they put their faith to protect them.