Killing the Empire of Japan's war machine through bombing the culture (which is actually what was occurring) into submission was in fact more than okay: it was necessary and moral.
They started massive wars of conquest across Asia (the likes of which are impossible to relate to for today's generations), butchered countless millions of people in the process, allied with Nazi Germany (!), committed even worse atrocities than the Nazis, and still refused to surrender even after being nuked once (with a large political & military contingent holding out even after the second nuke).
It required total war to stop them, and that obviously includes decimating their infrastructure, manufacturing, and the citizens that were responsible for manufacturing weapons (which had commonly been shifted out of large factories and dispersed into neighborhoods at smaller scale).
This is the same excuse many Germans that took part in the concentration camps used. Turns out, still doesn't make genocide okay.