They didn't indiscriminately set off thousands of bombs in supermarkets and homes. That's not at all an accurate description of what happened. That would be terrorism.
They gave a terrorist organization the ability to give its most important operatives a bomb to wear. And then they detonated that bomb. That's not terrorism. It's about as targeted of an attack as you can imagine. Blowing up terrorists is objectively a good thing.