I'll join Entropy in his remarks.

I'd rather return to your initial point, that all wars of the US - save for WWII and Vietnam (possibly) - were unnecessary because they "were not vital for the nation's well being or shaping the international environment." The Revolution established the country; the Civil War ensured that it would not be half slave; th e War of 1812 protected independence from the UK, the Mexican War established the southern US boundaries and American pre-eminence in N. America - something that protected Mexico from France in 1865, the Spanish American War made the US a World power; WWI redrew the maps of the world and set the stage for WWII as well as the Cold War. The Indian Wars both subjugated indigenous peoples and protected settlers from terrorism. BTW have you been to an Indian casino recently? I call them revenge takers on the "pale faces" The Banana Wars protected a number of states in the Caribbean from the predation of such European powers as the UK and Germany (albeit at a price but America never annexed these independent states). El Salvador was, I submit, a quite necessary war and the US intervention served to not only reduce the barbarity but helped the Salvadorans on both sides to achieve a much better and healthier society. Panama, in 1989, was a Just Cause and we left the place better than we found it. So, too was Desert Storm which was a classic resistance to armed aggression.

Even if you disagree with some, most, or all of the outcomes, the results of these wars did change the structure of international society (if not the rules of the game).

Cheers

JohnT