Islam possesses a religious law called al-Shari'ah in Arabic which governs the life of Muslims and which Muslims consider to be the embodiment of the Will of god. The Shari'ah is contained in principle in the Quran as elaborated and complemented by the Sunnah. On the basis of these principles the schools of this day were developed early in Islamic history. This Law, while being rooted in the sources of the Islamic revelation, is a living body of law which caters to the needs of Islamic society.
Islamic laws are essentially preventative and are not based on harsh punishment except as a last measure. The faith of the Muslim causes him to have respect for the rights of others and Islamic Law is such that it prevents transgression from taking place in most instances. That is why what people consider to be harsh punishments are so rarely in need of being applied.