It’s literally the same logic as why the U.S. nuked Hiroshima and Nagasaki. It saved more lives. A longer drawn out war would have been far more casualties on both sides.