At least in the US, that results in the dangerous people you mentioned being confined with lots of people with undiagnosed or untreated mental problems and lots of nonviolent (non-dangerous) offenders. On top of that, you have a significant number of innocent people incarcerated also, people who got screwed by the system along the way.
When we place all those people together, in a setting where violent assaults are shockingly common -- and, in particular, the constant threat of rape -- we are definitely making you less safe, not more safe. One might argue that at least the "dangerous people" are preying on other "criminals" while they are inside, but how many of those victims end up becoming MORE dangerous to you and your family due to years of state-supervised abuse?
When we place all those people together, in a setting where violent assaults are shockingly common -- and, in particular, the constant threat of rape -- we are definitely making you less safe, not more safe. One might argue that at least the "dangerous people" are preying on other "criminals" while they are inside, but how many of those victims end up becoming MORE dangerous to you and your family due to years of state-supervised abuse?