I’ve always heard that these cities in Japan were military targets, that there were military factories and bases in these places.
You may know more than me about the laws of war. I am not well versed in issues such as the Geneva convention laws of war, which countries are supposed to adhere to in military conflicts.
There may or may not have been military targets in these cities; if, for the sake of discussion we assume that there were, we are still bound by the rules of proportionality. (We can't burn Tokyo to the ground because somewhere inside Tokyo there is a factory that makes Mitsubishi Zeros.)
But the plan to target the population centers was in place before the B-29s even began their raids. At the Dugway Proving Ground in Utah, the US Army constructed a German and Japanese village in order to determine what incendiary bombs would be most effective in burning down a house. (This was in 1942.)
https://apjjf.org/2018/08/Plung.html