Why Did the Americans Bomb Hiroshima?

In 1945, the United States had beaten Japan thoroughly in the battle of the Pacific. All of the territories that Japan had conquered and taken over in the early part of the war were under U.S. control. However, in spite of being beaten so completely, Japan refused to surrender. When posed with the option of invading the main island of Japan, the U.S. estimated that the casualties could exceed 500,000. So they decided that dropping the atomic bomb would be a better alternative. While it killed many Japanese civilians, overall, less lives were lost, and Japan surrendered.