One theory for why two bombs were dropped was to intimidate Stalin into thinking there was a production line of such weapons -- ergo, he should stay out of western Europe.
I always thought it was because little boy was made if uranium which japanese intelligence had a pretty good idea of how much the US could produce in a year. Fat man was based on the more readily available plutonium but the detonation was more uncertain. Thus the test bomb produced by the manhattan project was also a plutonium bomb trying out the implosion detonation mechanism. Although never tested before the physics ov achieving supercriticality for a uranium bomb where never in doubt.