It prevents extreme crimes by making an example of the criminals. That is a major deterrent in all fields. When there are no examples being made showing what happens to these criminals, there is no great deterrent. The death penalty is a needed aspect of a country.