Guns are the founding part of basically every country, because in the end “Political power grows out of the barrel of a gun”.
You got the second amendment for the same reason the French got paragraph 35 of the Declaration of the Rights of the Man and of the Citizen of 1793: «Quand le gouvernement viole les droits du peuple, l’insurrection est, pour le peuple et pour chaque portion du peuple, le plus sacré des droits et le plus indispensable des devoirs.», because when their newly founded state relied on people's insurrection to exist, they made sure that they wrote their fundamental texts in a way that guarantees it. Then the political structure of the US made the constitution very stable compared to the French ones.
The second amendment's history was then co-opted by the NRA in their marketing campaign, but this has little to do with what the second amendment is really about, that “A well regulated Militia, being necessary to the security of a free State”. And the current gun culture is in fact mostly “conservative culture in the Reagan era and after”.