The guard is trained and equiped, many other forces as well, look at major rioting in the us is often quelled by military forces, also the military does do some of the border policing against drug smugglers off the coast. One of the first things Washington did as President was to send the army out to quell the whisky rebellion, so the precedent has always been there, look at Matewan or the vigilance committees in San Francisco.
Uh, what??
1. Maybe that's about what one defines as a "major" riot. Most riots I know of were handled by a combination of local and state police, using riot shields, tear gas, special vehicles, etc. Guard forces step in when the police don't have the manpower or other resources to handle the situation, and only when the civilian administration calls them in, and under the direction of the civilian administration. They are a last resort, not an "often" resort; it's more than a bit of an embarrassment to the police, the civilian administration, and the community as a whole when things degenerate to that point, and it is invariably followed by a great deal of soul-searching and finger-pointing to figure out what went wrong and find a way to keep it from reaching that point again. During the LA riots in '92, the California National Guard was not mobilized until 2 or 3 days into the riots, when it was clear the police could not or would not control the situation.
2. The military does not "police" the borders. They patrol the borders, using men and equipment to spot suspicious activity but allowing the legal authorities (including the Coast Guard and Border Patrol) to handle the arrests. That's a bit of a sensitive issue for those of us living on the border, so their duties and responsibilities are pretty carefully defined.
3. The Whiskey Rebellion was, as described, an armed rebellion. Increasing dissatisfaction with a tax on whiskey led to acts of violence and intimidation escalating to an attack on a tax collector's home by several hundred armed men. Washington went in with the state militias because he faced an armed resistance; fortunately, the show of force was sufficient.
4. Matewan describes an incident in which efforts by miners to organize a union, resisted by the mining company, culminated in a shootout between miners (led by a local lawman) and members of a private detective agency hired by the company to evict pro-union miner families. That led through various incidents to the Battle of Blair Mountain, where a large body of several thousand armed coal miners battled a body of about 3 thousand lawmen and strikebreakers, triggering intervention by the U.S. Army. Again, a case of the army being sent in to address armed conflict beyond the abilities of law enforcement, not police work.
5. Vigilance committees - I'm not clear on how a private vigilante group relates to the issue of armed forces being used for police work.
In each of these examples, we are confronted with military forces stepping in only when the situation was clearly beyond the capabilities of civilian police forces. Harking back to the original post, this would be like calling out the SDBs when an orbital patrol cutter's routine customs inspection erupted into a battle with a well-armed 400-ton pirate. One wouldn't tie up SDB crews inspecting every little free trader's hold for contraband when a cutter and a handful of customs guards could do the job, but one would most certainly like to have the SDB standing by in case something got nasty. It is as much a question of efficient use of resources as anything else.