There is a lot of nuance to this discussion that really doesn’t fit into our modern black vs white / binary way of looking at what is right and what is wrong. There is a legitimate question as to whether a mainland invasion of Japan would have cost even more casualties that the nuclear and firebombing of major cities. If you are fighting to win, in a war that you didn’t start, do you really think people are going to worry about how many enemies (combatant and non-combatant) that you kill? So questions like this really have 10 different answers all depending on what you value more in the equation.