Yeah, you're right. You have to be careful about how to respond to terrorism. You might think twice, before, say, invading a country that had nothing to do with the attack based entirely on a false pretext like W did. Oh yeah, I didn't mention before that not only did we kill lots and lots of civilians in Iraq, but the entire war was based on a lie! And everyone knows it. Yet we're not "pariahs." The closest we've come to that was when Trump was in office.
By contrast, however, if terrorists attack you, and you know where the specific terrorists who attacked you are, then yeah, you're going to attack them until they're gone, minimizing civilian casualties but tolerating what was unavoidable. Anyone with the responsibility of leadership would do it, if for no other reason, for pure politics. You'd do it too.