The Qur’ān mentions the purpose of administering the
punishments it prescribes:

The purpose of the death penalty is to safeguard man's
existence in this world:

"There is life for you in Qisās, O men of insight! that
you may follow the limits set by Allah." (2:179)

"He who killed a human being without the latter being
guilty of killing another or of spreading disorder in the land should be looked
upon as if he had killed mankind altogether, and he who saved a human being
should be regarded as though he saved all mankind." (5:32)

Imām Amin Ahsan Islahi explains this in the following
way:

"When the Qur’ān says: `there is life for you in Qisās',
it is actually referring to the life of a society and not to the life of an
individual. If a murderer is executed because of his crime, it apparently seems
as if a second life has been taken, but a little deliberation shows that this
punishment is actually a guarantee of the life of the whole society. If this
punishment is not carried out, there is a strong chance that the mental disorder
in which a person commits this crime is infectiously transmitted to the society.
The extent of various diseases differs: diseases which result in such heinous
crimes as murder, robbery, theft or fornication are like those diseases in which
it is necesary to amputate some limb of the body to save the whole body.
Amputating a limb may seam a callous act, yet a doctor has to be callous. If by
showing sympathy to this limb he does not force himself to this cruelty, he
shall have to bear with the patients death.

A society in its collective capacity is like a body. At
times, one of its limbs gets infected to the extent that the only option is to
cut it from the body through an operation. If sympathy is shown by considering
it to be the limb of a patient, there is all the chance that this would fatally
effect the whole body." ("Tadabbur-i-Qur’ān", Vol 1, Pgs 436-7)

In the cases of fornication, qazf and theft the purpose of
the punishments is that besides being a grievous reward of the crime, the
criminal be humiliated so that he becomes an example for the society.

In the case of fornication, the Qur’ān says:

"And let a party of the believers witness their
punishment. This man guilty of fornication may only marry a woman similarly
guilty or an idolatoress and this woman guilty of fornication may only marry
such a man or an idolator. The believers are forbidden such marriages." (24:2-3)

About qazf, the Qur’ān says:

"And never accept their testimony in future. They indeed
are transgressors." (24:4)

In the case of muhārbah (waging war against Alah and His
Prophet (sws)) and spreading disorder in the land, the Qur’ān asserts:

"Such is their disgrace in this world, and in the
Hereafter theirs will be an awful doom."(5:34)

About theft, the Qur’ān emphasizes:

"As a reward of their own deeds, and as an exemplary
punishment from God." (5:38)

Imām Amin Ahsan Islahi comments on this verse in the
following manner:

"(In this verse) two reasons have been stated for the
amputation of hands: firstly, it is the punishment of the crime, and secondly,
the punishment has to be given in an exemplary way so that it becomes a means of
a severe warning for others. The Qur’ān uses the word nakāl for such a
punishment. Since both these reasons are stated adjacently without any
conjunction between them, both of them must be regarded as essentials in carrying
out the punishment ie, a means of retribution of the crime and a means of a
severe warning for the society. Those who do not simultaneously take into
consideration both these aspects often end up thinking that the punishment is
severer than the crime itself. The actual fact is that this punishment is not
only the retribution of the criminal act, it is also a means to put an end to
the many crimes which may be triggered as a result, if the criminals are not
totally discouraged by treating them harshly. Like the craving for sex, the lust
for wealth is equally intense in a person. If this lust is allowed to thrive and
prosper, the consequences which arise may well be observed in our own society by
any keen eye. If a list of crimes committed in the most civilized of countries
in one year only because of theft is prepared, it will be enough to reveal the
truth. The fainthearts of these civilized societies are deeply moved if hands
are amputated because of theft, yet the horrendous crimes which result directly
or indirectly through theft fail to rouse any feelings of concern in them. Theft
is not a simple crime: it is a source of many crimes. If this crime is
eliminated, these crimes shall automatically be taken care of. Consequently, it
is a matter of experience that the amputation of hands on account of theft has
not only reduced instances of this crimes, it has also gone a long way in
reducing other crimes as well. If by amputating a few hands, the life wealth and
honour of thousands of people are safeguarded then this is not a bad deal at
all; in fact, it is a very lucrative one. Regrettably, our intellectuals fail to
appreciate this." ("Taddabur-i-Qur’ān", Vol 2, Pgs 512-3)