The Americans used the atomic bomb on Hiroshima because the Japanese refused to surrender when facing conventional warfare. Although the Japanese position was hopeless, they continued to fight, and casualties were rising.
In the middle of 1945, Germany had capitulated, and the American forces were overwhelming Japanese opposition. The Americans demanded Japanese surrender in the Potsdam Declaration, but rather than accept the terms, the Japanese increased resistance. In order to quell the Japanese forces, the United States needed to demonstrate indomitable force.
Many generals advocated continuing traditional warfare, including heavy bombing of the Japanese mainland, coupled with a massive invasion. This operation was code named "Operation Downfall." However, while this approach may have proven successful, the generals estimated that up to a million U.S. soldiers could die in the action. President Truman balked at such a death toll, and opted instead to use an atomic bomb, which had recently been developed by the Manhattan Project.
The bomb was intended to warn Japan of the devastating force possible from the U.S. military forces so that they would have no choice but to surrender. Hiroshima was selected as it was a major manufacturing hub. When the bomb was dropped, 80,000 civilians were killed immediately, and a huge number were injured. However, the Japanese did not surrender immediately after the bombing; instead, the United States had to drop a second atomic bomb on Nagasaki to bring about Japanese capitulation.