Japan was already on its knees and close to surrender.
The U.S. tightened the noose around Japan's neck methodically, one Pacific island after another. Japan had been fighting these numerous battles "to the death". There were even reports of Japanese civilians committing suicide rather than being captured or conquered.
Some military estimates that to complete the victory against Japan by ground combat might take as many as 14 divisions. Based on the attrition rates to that point, the cost victory in Japan (V-J) would have been horrendous, a bloodbath.
By those and similar estimates, though undeniably horrific, some military historians have claimed nuking Japan actually saved lives, by rendering the deployment of those 14 military divisions unnecessary.
The Allied requirement of Japan, "unconditional surrender", rather than negotiating terms. You say Japan was already on its knees and close to surrender. Even if so that hadn't changed its fight to the death combat style.
sear in the Middle East there's an expression "the enemy of my enemy is my friend". Israel in recent history was reportedly surrounded by hostile neighbors. Then Sadat, Begin, & Carter created an agreement between Egypt and Israel that has proved durable.
While socially other Israeli neighbors may bluster so as not to appear treacherous, Israel can serve a useful role as when Israel attacked and destroyed Saddam's Osirak nuclear infrastructure in 1981. Israel's Arab neighbors didn't want a nuclear capable Saddam any more than Israel did. Those Arab neighbors may not have publicly cheered Israel for the service. But they probably benefitted from it, and they knew it.