Islamic Law protects society – and punishments serve as a strong deterrent to would-be criminals. That is why crime rates are much lower in Muslim countries where real criminals are punished.
Gathering of the 29th session in the city of Riyadh, from 9th Jamada ath-Thāni 1407 AH to 20th Jamada ath-Thāni 1407 AH (1986 AH) where the Council studied and ruled on a letter sent to them from the Custodian of the two Sacred Mosques, King Fahd Ibn ʿAbdul-ʿAzeez, no. S/8033, dated 11/06/1407 regarding the matter of executing drug smugglers. In a part of the answer, the Council stated:
As it relates to the drug smuggler, then his punishment should be death due to the immense corruption that is caused by drug smuggling and bringing drugs into the country, and the resulting physical harm and danger that affects the whole of society. And counted along with the drug smuggler is the person who receives the drugs from outside the country, imports [and stores] them, and supplies them to the drug pushers.
Furthermore, whoever distributes the drugs (narcotics) whether by manufacturing them, importing them, selling or buying them, or handing them out as gifts and so on from the means of dispersal and distribution of narcotics and drugs – then if it is the first time – he should receive a severe discretionary punishment of imprisonment, flogging or a monetary fine — or all of these in accordance to the ruling of the judge. If he repeats the crime, then he should be punished with whatever will prevent his evil even if that involves his execution. That is because this conduct of his makes him from those who cause corruption in the land, and in whose soul criminal conduct is rooted — so the council has resolved that execution is a legitimate form of discretionary punishment (taʿzeer).
These punishments should be announced to the people through the various media outlets before they are carried out so that the people are warned and the excuses removed.
Council of Senior Scholars, Saudi Arabia. (Hai’at Kibār al-ʿUlamā’)
(Summarised part of the answer)
See Fatāwa Islāmiyyah, Dār al-Watan, vol. 3, pp. 279-280.
See also the English Darus-Salām version, vol. 6. pp. 210-213 and onwards.