Germans were already defeated, so this only left Japan. Truman knew that if we kept fighting that there will be lots and lots of casualties. So Truman had no choice but to make the difficult decision on dropping the bomb on Nagasaki and Hiroshima. So to sum it up the reason was to prevent any more casualties and to end the war.