So they were legitimate targets.
From the story here:
On the morning of Aug. 6, 1945, Setsuko Nakamura sat with her Grade 8 classmates on the floor of her private girls school, listening to a lecture about duty to the emperor. Setsuko and some of her classmates had been training as decoding assistants for the Japanese army, in preparation for the final invasion by Allied forces.