Then I gained perspective, and learned that Japan's navy had been entirely wiped out (EDIT: and the air force) the Japanese were trying to negotiate a surrender, but the US wouldn't budge on something as minor as allowing to keep Hirohito as figurehead emperor (which they eventually did after they surrendered after the nukes).
It was racism, plain and simple. Actually, it's more than racism, I'm not sure that word explains it. This isn't the relatively mild white-on-black racism of 1940s America. This is a much different level of racism, where Americans saw the Japanese as complete subhumans not even worth morally debating over. The Americans spent years building those bombs, so they must have thought it was anti-climactic not to try them. They didn't want to use them near the white people in Europe, so who best than a remote island of people you don't even view as humans, to the point where you put your own citizens in internment camps for sharing an ethnicity with them?
But I see so many Americans clinging to the myth that the nukes were a utilitarian moral choice. Admitting the truth to themselves would raise some questions about their country which clash with the perception they have.