The thought of being forced to stay in a jail might be a deterrent to a person who is thinking of committing a crime.