When this kind of thing gets tested against the United Nations human rights system (specifically the International Covenant
on Civil and Political Rights»
prohibition of arbitrary
detention) then it is justified by reference to preventing harm to potential future victims.