The goal was to bring the Japanese to Surrender under the terms agreed to by Roosevelt, Stalin and Churchill at Yalta. Many japanese apologists note that the Japanese were proposing terms long before Hiroshima, but the terms were not in line with the Yalta agreement.
And there remains the reality of what the Japanese were doing in 1945. Militarily, they were useless. But the events on Saipan, Iwo Jima, and Okinawa, where US casualties were extremely high, and Japanese casualties were appalling. (60% for Okinawa, 95% for Saipan, and all but 1 Japanese on Iwo.)
I personally would have preferred that one of the Japanese offers had been accepted in July , rather than turning Manchuria and North Korea over to the Russians. The Japanese were prepared to fight it out for every inch, and if every Japanese citizen died, so be it. The Japanese aren't just cute anime and Sanrio. They really are crazy. They were prepared to go the distance, and so we needed to convince them
Nagasaki was the convincer. It was to late, but it got the message across.