That the events under discussion were evil in themselves, and certainly deplorable considered in isolation, is beyond argument.
Unfortunately, that is not always a sufficient consideration in prosecuting war. The over-riding ethical imperative in war is to attempt to inflict the minimum degree of cruelty necessary to bring the thing to a victorious conclusion. One has no business engaging in the enterprise at all if one is not convinced the end signified by victory is an improvement of the situation from what it was when the war commenced. On this, obviously, there can be a great deal of debate, and necessarily considerable disagreement on the part of the combatant powers, and one can only be guided by one's own values. In the instance of the Second World War, it is impossible for me to see the war aims of the Axis powers as good, or indeed as anything but evil in the extreme.
There are two elements to this discussion, one of which has been gone into at some length, while the other has not been touched on at all. The former is the fact that the atrocious conduct of Imperial Japan commenced the war in the Pacific, and so brought with some inevitability, considering the actual balance of material forces, ghastly horrors down on the populace of the Home Islands. The latter, unremarked so far, is consideration of what is needed to break the power of an aggressor state, and what was available to the military art of the time.
It is an unfortunate fact that there is no way to assail a government in the era of total war without doing great harm to the population it governs. The capability to manufacture and distribute weapons, and to fuel the machines of war and transport, and to feed soldiers and workers engaged in war manufacture, are the keys to the business. In our present day, these things can be done with some degree of precision, but in the period of the Second World War, only very blunt instruments were available. Blockade which cuts off importation of food and fuel and raw materials imposes malnutrition on the civilian populace, which leads to disease outbreaks and a great increase in death rate. Aerial bombardment did well to hit a target the size of a city; effective bombing of factories proved to be largely a mirage. Ruining of rail networks, and harrying of road transport, conducted by fighter bombers when these could be brought in range, swept up many civilians and imposed a sort of 'internal blockade', with the same effects as the external form. It became quickly apparent to those directing the war effort against the Axis that there simply was no way to weaken the enemy save measures that killed a tremendous number of civilians, and of all ages and conditions. A peculiar twist of horror layers onto this with the understanding that the leadership of totalitarian regimes above all others is most impervious to the suffering inflicted on its civilian population, and so this will be slower to effect the councils of such a regime than it might others differently constituted.
But it remains the case that without the aggression of those regimes, which put on others the necessity of breaking them, and the atrocious conduct of that aggression, which steeled political will to see the thing through no matter what, none of the various sufferings endured by civilian populations in Imperial Japan and Nazi Germany would ever have occurred. It is also the case that what was inflicted on these civilian populations did materially shorten the war. Some of this suffering was directly attendant on actions against strictly defined military objectives, much of it was occasioned by more general measures intended to break the will to fight of both the populace and the leadership, both political and military. In the case of Imperial Japan, the best assessment of the results of the campaign as a whole is that it crippled military power outside the Home Islands, reduced popular fighting spirit, weakened the will to fight of the political leadership, but did not diminish the will to fight of the military leadership in any appreciable degree. The will of the population, in the Japanese system, was the most negligible factor, at least until some putative future collapse under immediate strain to wholesale desertion of soldiers and defections of civilians to an invading force. The military leadership believed it had in hand sufficient fighting power in the Home Islands to bloody an invasion badly, and was resolved to hold on till that crisis materialized: whether it was right or wrong in this assessment is immaterial to the effect it had on their actions.
The story of the last months of the Pacific War is the story of interplay between the weakening will to fight of the political leadership of Imperial Japan, and the resolve to continue fighting of the military leadership of Imperial Japan. In the Japanese system, the military leadership held control of the government, unless directly ordered to some course by the Emperor. In the wake of the catastrophic fire raid on Tokyo early in 1945, the will of the key figure, the Emperor, to continue the war began to weaken, but not sufficiently for him to command the military leadership to surrender. His attitude was sufficient to empower civilian political leadership to commence halting peace feelers, but these were opposed by the military leadership, and worthless without their support. The only peace terms the military leadership was willing to consider were wholly unacceptable to Imperial Japan's enemies, and rightly so, as they would have simply ratified much of Imperial Japan's conquests, and left the same military dominated political structures in place. The Emperor was not moved to directly order the military leadership to surrender until after the atomic bombs, and the Soviet invasion of Manchukuo. It is a dicey debate which of these was the dominant factor, but in any case, the Soviets did not move until August 9, after the atomic attacks.