Narrated Jabir ibn Abdullah: A thief was brought to the Prophet (peace_be_upon_him). He said: Kill him. The people said: He has committed theft, Apostle of Allah! Then he said: Cut off his hand. So his (right) hand was cut off. He was brought a second time and he said: Kill him. The people said: He has committed theft, Apostle of Allah! Then he said: Cut off his foot. So his (left) foot was cut off. He was brought a third time and he said: Kill him. The people said: He has committed theft, Apostle of Allah! So he said: Cut off his hand. (So his (left) hand was cut off.) He was brought a fourth time and he said: Kill him. The people said: He has committed theft, Apostle of Allah! So he said: Cut off his foot. So his (right) foot was cut off. He was brought a fifth time and he said: Kill him. So we took him away and killed him. We then dragged him and cast him into a well and threw stones over him.
It seems that Muhammad passed judgment before hearing the case. Also by cutting a thief%u2019s hand he is left with no other means to earn his bread except begging, which would be difficult since he is defamed as a thief and so hated by people. Therefore re-offending becomes his only means of livelihood.