By the time we used the atomic bombs, Japan was already in the process of trying to surrender. But we made a big deal about "unconditional surrender" so the bombs were like hitting a boxer who's already fallen, but then tries to get back up and dropping a cement mixer on him. Wasn't necessary, but was expediant. It only forced the Japanese to give up on 'conditional surrender.'
As we only learned in teh decades that followed with atmosphereic testing, the altitude you detonate a nuclear weapon determines how effective it is. Too low, or on the ground much of the shockwave is absorbed/lost right into the earth. Too high and the shockwave doesn't inflict maximum damage. The sweet spot depends on the yield.
Aiming points and even low-yield atomic class weapons is kinda laughable. Doesn't matter where it goes off, especially nowadays when so much bad info has everyone wetting themselves at the idea of another being used in anger. Mushroom cloud rising over open ocean with just fish being killed will have the exact same result vaporizing a city will insofar as the panic that'd ensue. Actually hitting any part of the city had the same result an on-target blast woulda. The point wasn't so much to inflict more damage but to bluff them into thinking we had more we could use. The bluff worked, but we'd been making many many more now that we knew we could and how. If the war had dragged on, we'd have had more to use.