Indeed, not "best behavior." And in at least some of these cases (Certainly Vietnam, pretty clearly Iraq, and arguably Libya), these nations didn't even deserve a "quick whack."
Vietnam - We intervened to prop up a colonial power (France) that had been driven out by the Japanese, and fought against, to the point of defeat, by an indigenous, nationalist movement. If you believe what the Declaration of Independence says, we had zero justification for that intervention.
Iraq - We all know that the Bush administration's excuses for invading Iraq were bogus.
Libya - They had a nasty government, but weren't much of a threat to anybody, really. And the results of our intervention were just to make things worse.
Afghanistan - One can make a case to support the US intervention to destroy Al Queda, after the 9/11 attacks. There is, however, no real case for the mission creep and nation-building that has us still there, all these years after the failure at Tora Bora.
There are, of course, other examples - but if you look at all the US military interventions post-1945, you're going to find a couple that are justifiable as "good behavior," and a whole bunch that, simply put, are not defensible. Apparently, we just like to play "superpower,", but we're not all that good at it.