Japan was beaten. They had already offered a complete surrender, conditional only on keeping the emperor, which was rejected by the U.S. Their utter defeat and the hopeless state of their armed forces was well-known by the allies, since their communication encryption had been cracked months earlier.
The real issue was likely that the Soviet Union, positioned to become a formidable power in the post-war theater, had promised to enter the war against Japan on August 6. The Americans needed to make sure that Japan had been defeated by that point and that the U.S. would occupy Japan, not Soviet Russia. Hence the rush to drop the bombs before that.
Also, there was no uncertainty about the lack of military significance of Hiroshima and Nagasaki, the contemporary reports state this clearly, they even warn about the presence of American POWs in the area (which was ignored and they were incinerated along with the hundreds of thousands of Japanese civilians).