The definition of "military target" was an arbitrary definition (like most definitions) done by those who decided to bomb them. Kyoto was also a possible target favoured by the military, and it was replaced by Nagasaki.
And as you know, Hiroshima was chosen because it was undamaged and the effects of the bomb could be studied. So we can add "weapons testing on civilians" to the list of crimes.
On the other other Kyoto was not - and was removed because of that.