They wanted to end the war as fast as possible. Did they send Japan film of the Trinity bomb test? Why did it take 2 bombs to be dropped for Japan to surrender?
Nothing. It was deliberately kept as secret as possible. The goal was to shock Japan into surrender; as one of those involved with it put it, the goal was to essentially being "saying to the Japanese that as natural forces are evidently on our side and as we have no intention of destroying their people or their religion they might well capitulate to the power of the universe." They felt that no amount of warning or demonstration would do that more adequately than actual destruction.
So they dropped one bomb on Hiroshima on August 6th. Several hours later, they released propaganda that explained what it was (even the survivors at Hiroshima did not realize it had been an attack with a single weapon, and they were instantly cut off from the rest of the Japan by the destruction). The Japanese high command ordered a team of scientists to investigate the claims on August 7th. By August 8th they communicated back that it was indeed an atomic bomb. That night, on August 8th, the Soviet Union declared war on Japan and invaded Manchuria. This caused the high command to organize a meeting the next morning, August 9th, to discuss the direction of the war. During that meeting, in which everyone was pretty much coming around to the idea that surrender was the only good option at that point, they got the news about the Nagasaki attack — it doesn't seem to have affected their positions at all.
Finally, on August 10th, they offered up a conditional surrender to the USA — they'd surrender but keep their Emperor, more or less. The USA said that was unacceptable. Conventional bombing followed, and there was an attempted coup by Japanese junior officers that was suppressed. Finally, on August 14th, the Emperor himself broadcast a speech saying that they'd accept unconditional surrender.
I give this background just to show that it isn't as simple as "2 bombs = surrender" — there's a whole complicated chain of events, circumstances, even potential other causes of surrender (the Soviet invasion). The second atomic bomb seems to not have had much role in all of that. The role of the first is not entirely clear, either. Exact causes are difficult to ferret out; reality is a murky mix of things. Even after two atomic bombs and the Soviet invasion, the Japanese were not prepared to accept unconditional surrender by itself — it took a rejection and a coup for that to happen.
But to your bigger point: all of the above was secret. The Japanese were not told that atomic bombs existed, would be dropped on them, that the USSR was going to declare war on them, etc. The goal was to use secrecy as a weapon.
On the causes of the end of the war, Hasegawa's Racing the Enemy has a lot of detail. On the secrecy, you'll have to wait until next year for my book on nuclear secrecy to come out!! :-)