Suppose that was a crime. Who punishes the criminals? Maybe that is exactly what the US sees itself doing?
Unfortunately to punish war criminals, usually you have to win against them in a war.
Also I think they changed their allegiances, so they became terrorist towards US people?
Funny you ask... It was called the cold war, you might want to look it up. US was a pretty big player there.
Before cold war, there was WWII, and communist revolutions.
I don't want to defend any particular war, I just think it may all be a bit more complicated than a simple "we shouldn't have started any wars".