Most that are locked up for homicide have prior convictions for non-homicide. Keeping them in prison prevents homicide from happening in the first place. Better for them, better for society to keep them out of harms way.
Seems like an error in reasoning here: If you are a murderer, then you have priors. You have a prior, therefore you are/will become a murderer.
https://en.wikipedia.org/wiki/Affirming_the_consequent aka the converse error.
- Oscar Wilde