Hiroshima was a major port and a military headquarters, and therefore a strategic target.
Hiroshima was chosen as the first target due to its military and industrial values. As a military target, Hiroshima was a major army base that housed the headquarters of the Japanese 5th Division and the 2nd Army Headquarters. It was also an important port in southern Japan and a communications center.
https://ww2db.com/battle_spec.php?battle_id=49
That’s like saying it would be OK for the U.S. military to shoot down TWA Flight 800 because there was an al-Qaeda operative on board.