The decision was taken by the leaders in WWII than unlike in WWI the enemy (aka Nazi's and Japan) had to be utterly defeated. There was going to be no repeat of what I call the "Pershing Effect" that is unless they are utterly defeated they don't believe they really lost and you end up doing it all over again.
History had proved with Germany that a ceasefire and negotiated peace had been the biggest mistake of the 20th Century costing tens of millions of lives. They where not going to make that mistake again, unconditional surrender and occupation was the *ONLY* option on the table from the allies.
The nuclear bombing of Japan provided that total and utter defeat of Japan while risking the fewest possible allied lives, and bringing to an end the Japanese death toll across Asia in as short a time as possible.
The idea that the nuclear bombs didn't have an effect on the Japanese war cabinet is pure and total revisionist fantasy.
For starters it is in direct contravention of recorded testimony given by surviving members of the Japanese war cabinet after the war. There are TV documentaries with these interview in for the whole world to see. Neither you or any other person who was not in the Japanese war cabinet can argue with their testimony.
Even at the 11th hour there where attempts by factions of the Japanese military to stage a coup and stop the unconditional surrender.