The hazard rate of a violent act is much higher among violent offenders, and it would be inhumane to put everyone in solitary confinement, even if you could afford it. Therefore, a prison containing violent offenders will never be as safe as the overall outside population.