Your logic is crazy; do you even understand the concept of "revenge"? It doesn't mean to do something to deter further things from done to you. Think like an actual human being, not like a computer programmed to calculate benefit. Human beings want revenge when they are wronged. If you came into your house and saw that someone had just stabbed your wife and children to death and is now standing there at your mercy because you happen to have a loaded gun, you'd shoot him, probably several times starting from the legs up. At least I would. You wouldn't think, "Hmmm, killing him won't bring back my family, but this bullet cost me money and an extra body means even more mess to clean up. Best to let him go since there's no benefit from killing him. Hey, my son's dead now so let's ask him if he wants to be adopted. I could use an adult son who can help clean up this mess..."Ok, but then what is the purpose of revenge? It is completely expected that citizens and perhaps the individual leaders of the besieged country wants to exact the same kind of treatment it was dealt, but as a military establishment deciding the country's future, what is the end benefit of destroying your attacker?
There is only one scenario in which case your logic would apply: when Country A attacks a portion of Country B. In that case, Country B can launch a retaliatory attack to deter further strikes on its territory. But in a scenario in which Country B is completely destroyed, is there a logical necessity to retaliate?