It was used because:
- Truman's order authorizing use of the bomb authorized use of all bombs available as soon as they became available and conditions were suitable for delivery, until Japan surrendered.
- The first 2 bombs became available about the same time.
- Japan did not surrender until 5 days after the second bomb.
- The third bomb became available 4 days after Japan surrendered and so was not used.
It would have taken a special order direct from Truman, canceling his previous authorization order to prevent the second bombing. Not very likely.