let say you are commander in british army working in afghanistan and you find out terrorists planing to bomb london, would you bomb the cave?
let me answer for you, ofcourse british army commander would bomb terrorists and laugh knowing how painful they died even they didn't bombed london.
but the different is god punish people who do evil to other humans
Just for the record, let me show you how this analogy does not work:
1. If the British Army Commander was bombing the cave in revenge for planting a bomb in London, then I would call the British Army Commander evil and I think he would get along quite well with Allah.
2. If the British Army Commander was bombing the cave because he had reason to believe that the terrorists were planning further bomb attacks around the world from the cave and also has reason to believe that it would be very dangerous to send in troops to take the terrorists as prisoners, then the Commander would probably bomb the cave for the sake of preventing further innocent lives from being killed by bomb attacks. But who exactly is Allah trying to protect by sending non-believers to hell to be tortured forever and ever?