Hiroshima was anything *but* a military base. It was one of the least militarized cities in Japan, which is why it had been so little touched by conventional bombings.
One quarter of the casualties from the direct bombing were soldiers. The city served as the headquarters for second general army, the 59th army, and two divisions. Aside from the aforementioned 20,000 military casualties, the bomb also beheaded each of those commands. The city population was approximately 345,000 and there were 40,000 soldiers stationed within the city for a total of 385,000. The bomb killed 20.7% of the people inside the city, 17% of the civilian population, and 50% of the military population.
Another militarily significant feature of Hiroshima that is often overlooked is its status as a transportation hub. Destroying facilities in Hiroshima would greatly impede Japan's ability to move soldiers and material around the mainland. This is one of the things we learned very quickly from the bombing campaign against Germany. Going after transportation targets was a very good way to take down the enemy's ability to produce war material as well as move troops around to defend against offensives and the USAAF general in charge of the atomic bombing was Carl Spaatz who was a huge supporter of transportation bombing who was transferred to the Pacific Theater after the war in Germany was concluded.
Say what you will about the other criteria for target selection, Hiroshima had plenty of military strategic benefits to bombing and it's rivers made it unsuitable for LeMay's firebombing,