
From a strictly “lives saved by dropping the bombs” viewpoint there were far fewer deaths than a theoretical invasion of mainland Japan. On the other hand you could claim the firebombing of Tokyo is what sealed the deal and the bombs played only a small part of Japanese surrender (also the threat of the Russians joining the war)
The answer is rather simple. There were 2 surrender addresses: one of which was directed at the mainland army in China which directly mentions the Soviets as a reason for surrendering, the other was directed to domestic political officials and civilians which cites the nukes as the reason. The army didn’t care about the nukes and was basically going rogue during the war with the mentality of “just keep the war going, who cares if we get bombed at home this is war, it’s all killing allies to me”