Of course the Japanese did not deserve it. But it was a much necessary thing to do to end the war and prevent many millions from dying.
Unfortunately some 100.000 people died from the atomic explosions. But that —and the Soviet sweeping of Japanese positions in Asia— brought a quick end to a conflict which could have last until 1947 and which would have meant the death of more than 200.000 American soldiers, many thousands of Soviet soldiers and millions of Japanese —mostly civilians—, as well as the complete destruction of Japan and a post-war division like that of Korea, Vietnam and Germany. A Tokio Wall...
Ironically, those 100.000 Japanese killed in Hiroshima and Nagasaki saved the lives of millions of people and allowed many more millions to live in a post-war Japan which rapidly recovered and became the 2nd richest country in the world.
__________________
"Only the dead will know the end of the war" Plato
"Tempus edax rerum" (Time devours all) Ovidious
"Vivire militare est" (To live is to fight) Seneca
"Tout est perdu forst l'honneur!" (Everything is lost, but the honour!) François I of France.