The US government has nukes, but they still got their asses handed to them in Vietnam and struggled in Afghanistan and Iraq. It's true that if the feds truly want to squash an uprising they have the means to do it. But do they have the will to do it? At what cost? I can imagine a scenario where they'd be willing to use enough force to subdue unarmed citizens by not enough to subdue an armed uprising, which could escalate to civil war.
In short: there exists a scenario in which the second amendment enables the citizens to resist the government to an extent that they wouldn't be able to otherwise. Whether this is a good or bad thing is something you can decide for yourself.
Now assume half the military itself is sympathetic to the “rebels” and the government would have a difficult time containing any real insurgency.
The US government has made a lot of enemies over the decades, many of whom would be more than willing to provide modern weapons and explosives to the insurgents.
Though the US overwhelmed the Iraqi military quickly and decisively, it was a decade of constant roadside bombs, made with materials easily smuggled into the country and implemented with minimal training, that eventually wore down US morale and willingness to fight.
Finally, the US military is such a big business here, a good percentage of the population has had professional military training and combat experience.
That being said, there are, of course, a bunch of other examples of armed conflicts with the government that do not turn out well for the "citizens" when the government decides to violently pursue its goals (1985 MOVE bombing, Waco, Ruby Ridge, etc). But, I guess my point with all of this is that, for better or worse, the proliferation of guns in American society certainly does have an effect on the decision matrix of the government (even if the "citizen militia" ultimately does not stand a chance against a determined government response...
This is precisely the intended effect. Sure some wahoos think they could fully overthrow the military but for most it is about changing the calculus from "tyrannical takeover of unarmed populace with minimal resistance" to "uh oh, they are fighting back". This results in much more of a cause to rally around, feed into rebel propaganda, win over military members to the "just cause" which of course tips the balance, etc.
We saw what only a few hundreds of folks could do when parts of the normal defense are strangely absent. Imagine even a 30% defection.
If it was ever at that point, the military would not exist in its current form.
The "military" is not a monolith that would just suppress a revolt if it was that size and scope that it needed to. The Civil War in the U.S. had almost all of its Confederate soldiers come from the U.S. Army. The current leadership corps in the U.S. military is disproportionately Southern and conservative. They're not going to be going against their countrymen if it came to that, and no one is going to be nuking their own cities.