They dropped the second bomb quickly to prove it was not a fluke...Tojo did not believe the stories about the first bomb.
BUT we did not have a third bomb ready.. It was a huge gamble that worked.
That's the story as I had understood it for a long time. However, it isn't true.
It turns out there was another one ready to drop on the 19th, two more in September, and probably three in October. They were expecting to crank one out about every ten days. It was felt that the initial shock and awe would either work or not work. And, in the event it didn't work, there was debate as to whether to drop the bombs as they were produced or to save them up for Operation Downfall, the planned invasion of the Japanese mainland. Of course, VJ Day came on the 15th, rendering the deliberations moot. Source.