Why did Japan not surrender before the bombing?

Japan didn't surrender before the bombing because they wanted to get more favorable terms of surrender. The emperor wanted to maintain control of the nation and they did not want an occupation force that would keep them from building another military. On the other hand, the rest of the world did not want Japan to build their military and attack again, so the rest of the world required unconditional surrender. The Allies had already suffered enough loss during the war and did not want to send a million soldiers to their death in an invasion of Japan, so since the Emperor refused to surrender, the Allies used nuclear weapons to force compliance. There really was no other choice to President Truman at the time.

The Japanese did not surrender because they had too much honor. Their emperor would not accept defeat and their people would fight to the death. They were not afraid and even after the bombs were dropped they didn't surrender. The Japanese surrendered because of the Soviet's threat to attack them.