It has nothing to do with "loosing the war" and everything to do with who those wars were fought against.  For example, in Korea and Vietnam, US troops fought foreign enemies.  During the civil war, the Confederates committed an act of treason and declared war on the US.  I hope that helps put that little false equivalence to rest for you.