There were no cell phones, surveillance cameras, or any way to communicate quickly between all different places. So the only way to know if enemies did some criminal act is if you directly witness it, or if somebody else directly witnessed it and came to you and told you. There was just no way to protect a whole country, or any large area, from attacks like that with no way to watch all places.
For this reason, it was the common action to build internment camps, and any large group of enemies you are battling against, all of them would go in the internment camp. Because it was also unknown which people within the population were doing the violent acts, or which ones may be planning to do violent acts. So the whole population would all be brought into one area where they could all be watched. They would be fed, they would be given medical treatment if they needed it, they would be treated humanely. But they would be in this fenced in area, so that they are not out doing crimes. And while they are all in the same place, they would also usually be given work to do. Depending on the type of work, it often was fine for at least most of the people involved. Having something to do like some basic task is more interesting and feels better than sitting there doing absolutely nothing for weeks or months at a time. So there was some basic factory work, things like making clothing or building things. There were also survivors from auschwitz who wrote about things like soccer games, musical performances, and plays that they had to try to keep everybody in a good mood. I forget which documentary it was, but survivors were talking about this, and it also showed pictures of these.
This was the common thing to do in all countries in that time in history. And all countries involved in WWI and WWII all had these internment camps. There was not a single country in the war that was not doing the same thing. Including Canada and America also having these camps. America put the Japanese Americans into the same kind of camps.