Not to quibble, but the second world war had at least 60 million deaths if not more than that (at least 20 million in the Soviet Union alone) and then millions and millions more who were homeless or displaced when it ended. It was the single most cataclysmic event in human history. On every front, it was like something from Dante's nightmares... its almost fitting that it ended with a bomb that reduced human beings to literal shadows.
The Manhattan Project was formed when the race for a nuclear weapon was between the western Allies and the Nazis. Until the German surrender in May 1945, Manhattan Project scientists were working under the goal of having a working nuclear bomb before Hitler did, but I'm not sure if a bomb to win the war and bring everyone home was ever the explicit goal. As late as March of 1945, the American government expected the Nazis to hold out until at least the end of the year. They obviously fell much sooner than that.
Following the German surrender, the allies turned their attention to Japan. After the fall of Okinawa in April, the Japanese government began to internally debate the conditions of surrender they would accept. Once set up on Okinawa, the Americans sent bombing raids onto the home islands- fire bombing raids over Tokyo killed hundreds of thousands of civilians and burned large swaths of the city. Made Dresden look like a fireworks show. These raids were actually initially deadlier than the atomic bombs. After the bomb was dropped on Hiroshima, the Japanese remained steadfast in their desire to fight on until a more favorable peace to them could be obtained. What gets lost is that on the same morning the Nagasaki bomb was dropped, the Soviet Union invaded Japanese occupied Manchuria. A war weary American public accepted the government line that the few were sacrificed for the many but the war was essentially over with or without the bombs. Japan had no oil, no allies, their manufacturing sector had been crippled, their navy was basically sunk, their territorial gains had all but disappeared and they were staring down a famine with the country's supplies running dangerously low. Unlike the Nazis, the Japanese still had a choice at that point- and they desired to deal with Truman instead of Stalin. Would the war have ended without a full scale American invasion or without the use of nuclear weapons? These are unanswerable questions. But theres certainly enough there to make a debate of it, and have no fear, Nolan makes a debate of it. He presents all facets of the dropping of the bombs, and the reasons for doing so. To end the war decisively, to flex their muscles for the Soviets or simply because... as you said, these are people -scientists, army brass, politicians- with egos, and seeing what the thing they spent 2 billion 1945 dollars on actually did was probably part of it too. I thought Nolan evoked the time period and navigated the politics of the time pretty well, he lays it all out so you can draw your own conclusions. I've read criticisms it doesnt moralize enough. I think I'd prefer my films about a ethically murky event stay that way. I hope you enjoy the film as much I did.