I heard they were chosen because of they were strategic militarily.
Japanese industry at the time was highly dispersed, as a deliberate defensive measure. Just about any Japanese city was "strategic militarily". USAAF had a list (and checked it twice) and they were all "naughty". Some more so than others. Hiroshima and Nagasaki hadn't been hit with incendiary bombing (yet), just because they weren't at the top of the list. This made them ideal targets for the atomic bombing: militarily significant, but as yet undamaged. Also, Nagasaki wasn't the primary target for Bock's Car ... IIRC, Kokura was. But Kokura was completely overcast so they hit their secondary target (Nagasaki) instead.
Incidentally, USAAF ran a "leaflet bombing" campaign in late July, 1945 warning that any of several cities were about to be destroyed and that the citizens thereof should evacuate.