The US bombed Afghanistan because that's where Al-Qaeda was. Then Pakistan because that's where Bin Laden was. Nobody said, "my God, a terrible thing happened. America violated the sovereignty of Afghanistan or Pakistan." Don't harbor terrorists, nobody will act on your territory. It's our right to act against terrorists who attack from other states.