Yes, Hiroshima and Nagasaki provided a valuable demonstration of the effects of America’s new weapons. On the other hand, the idea that the bombs were absolutely essential to end the war is mainly a product of decades of selective reporting of history.
At the Yalta conference, the Soviets had agreed to declare war on Japan within three months of the end of the war in Europe. Japan kept fighting in the hope of negotiated settlement with the Soviet Union as the mediator. The Soviet declaration of war and overwhelming invasion of Manchuria, Korea, and Sakhalin Island changed that equation. The Hiroshima bomb was dropped on August 6, the Soviets invaded the night of August 8, and the Nagasaki bomb dropped in the morning of August 9.
Waiting a few days for the Japanese response to the Soviet declaration of war may well have eliminated the justification for using the bombs. On the other hand, if the bombs were really responsible for ending the war, then Roosevelt allowed the Soviets to gain control of northern China and northern Korea for no good reason. That would imply that the current communist regimes in China and North Korea owe their existence to Roosevelt’s miscalculation.