I think for reasonable minded people the threat of imprisonment will cause them to stop and think but the repercussions of getting caught doesn’t even enter the average criminal’s thought process.
even with a death penalty the USA still has a high murder rate
As you say the understanding of consequences and the loss of what you have deter most people from crime
People tend to kill for love/sex or money, its something they dont have so they have nothing to lose
If someone has nothing they dont fear consequences, hence a high crime rate