It's complicated. The cynic's answer is "The United States prides itself on not turning its military on the civilian populace, and the National Guard is the practical method by which they hold a nation together while refraining on paper from such use of force."
As with so many aspects of American governance, they "solved" an either-or problem by implementing both ideas.
First item on this list: https://www.military.com/military-life/6-times-military-was-...
> 1863: The New York City Draft Riots > the governor [...] had to call in U.S. Marines.