Another potential goal of the war may have been to demonstrate that the USSR couldn't hope to win a conventional war against the US (the 1973 Easter offensive fielded 700-1200 tanks of various kinds, and the US destroyed 400-700 of them with trivial losses to US forces). The Soviets were using 15-20% of their economy to produce, among other military items, 4000 tanks a year, so a demonstration that the US could destroy so much without significant losses or any particular economic strain could have been shocking. If that was a real goal, though, it probably couldn't be openly discussed at the time, which would have contributed to the "why are we even there?" mood of the American people.
In the event that someone is directly attacking Americans in America, I think you'll find that Americans are more united than it appears.
Americans culturally have seen ourselves as the "Good Guys" for the last century or so, and Good Guys imply Bad Guys. If there aren't any credible Bad Guys external to the US, Americans start thinking the Bad Guys are the rich, or the coastal elites, or flyover country, or liberals, or whatever. That's just 'cause there's no one else to be against, though; it'll pass.
Hence Trump's continual (and false) claims that the cities he's targeting are lawless and dangerous places.
The above applies to federal US military forces. The laws specifically exclude the US Coast Guard. Non-military federal forces (FBI, ICE, etc) are also excluded.
It also, in the more complicated quirk, excludes state military forces (i.e. "National Guard" units). These forces can be activated under a variety of different legal frameworks (see https://www.nationalguard.mil/Portals/31/Resources/Fact%20Sh... ), some of which allow their use for domestic police functions (Title 32 and SAD), because they're still under the command of the state governor (who can use military forces to perform domestic policing functions inside their state or a neighboring state).
There's also a special exclusion for Washington, DC, as technically the president is sort of its governor for many purposes.
Given that background, what actually happened...
- Trump activated National Guard units under Title 10 (aka federal active duty service), because this doesn't require the consent of a state's governor
- Trump then deployed these units to several cities, some with the support of Republican governors and some without the support of Democratic governors
- The administration's legal team realized performing policing functions with the above forces was on extremely shaky ground
- Therefore, they mostly claimed (loudly) that they were deploying "the military", but in actuality used them for extremely limited, non-policing purposes (picking up trash, talking to tourists, guarding federal buildings, guarding other federal agents performing law enforcement functions)
The US was barely treading water militarily, at enormous cost in both lives and cash. It was not progressing towards its military and political goals. That's why the US public pulled the plug.
The US could have continued to tread water for another 5 years, or another 10 years, or another 15 years, and would have lost even more men and spent even more money, and it would still have faced the same problem: there was no way to win the war. Every day that the war continued just meant more deaths and more money wasted.