It is a punsihment but I was giving 2 quick examples of how life sentence does not stopa killer from killing again unlike the death sentence, which stops killers from killing again.
If one looks at the situation in such a manner, then
no punishments can stop a criminal from committing a crime again, save the death penalty. Of course, there is a slight difference, in that once one is imprisoned for life, and there is no higher punishment, there is little to deter one from committing further crimes.