1. It was the 1940s so unfortunately there wasn't anyone like you around to teach people right from wrong.
2. Japan attacked us.
3. We had reason to suspect they had spies/saboteurs/agents here (Japanese spies posed as tourists for target selection at Pearl Harbor).
4. There was a small conflict happening in a few scattered nations that required immediate attention and a quick resolution.
And yet not a single Japanese-American committed any espionage or sabotage whatsoever, and Japanese-Americans who fought abroad were some of the most decorated of them all.
Google the 442nd Infantry Regiment for more info.
And it's not just America that is guilty. The Australians AND the Canadians were just as guilty in rounding up people of Japanese descent and sending them to their own internment camps.