Why did the Prophet order to cut off the hands and feet of the people who killed the shepherd?
Narrated Anas bin Malik: Al-bukhari 5727
Some people from the tribes of Ukl and Uraina came to Allah's Messenger (ﷺ) and embraced Islam and said, "O Allah's Messenger (ﷺ)! We are owners of livestock and have never been farmers," and they found the climate of Medina unsuitable for them. So Allah's Messenger (ﷺ) ordered that they be given some camels and a shepherd, and ordered them to go out with those camels and drink their milk and urine. So they set out, but when they reached a place called Al-Harra, they reverted to disbelief after their conversion to Islam, killed the shepherd and drove away the camels. When this news reached the Prophet (ﷺ) he sent in their pursuit (and they were caught and brought). The Prophet (ﷺ) ordered that their eyes be branded with heated iron bars and their hands be cut off, and they were left at Al-Harra till they died in that state.