This question falsely presumes that the government's military is not also fractured by whatever is causing the militia to revolt. The military is made up of citizens.
To protect yourself from and fight against weakened fractions of the government.
The military cannot occupy the entire space of the US so maintaining order of a tyrannical government would require a low ratio of military guards to citizens. With even 50% of the citizens potentially armed and willing to fight back, it's an untenable position for the government.
A militia could fight just as effectively as the Taliban against the government and be several orders of magnitude larger. The US military is good at eliminating identified enemies, but it's pretty terrible at nation building and that's even in its strongest state.
If you are referring to the Taliban and their precursors, they have had, and continue to have significant financial and logistical backing from nation states.