The Torah or the Hebrew Bible was written by the priest Ezra following thier return from the captivity of Babylon; the original Torah which had been kept in the temple at Jerusalem had been torn up and burnt by Nabuchodonosor.
So
when they returned to Palestine after the 70 years in the bondage of Nabuchodonosor, they had no Torah, then the Priest Ezra rewrote it for them.
<
quran-ayat.com/conflict/index.htm#The_Torah_[or_Hebrew_Bible]_of_Ezra_>
The Hebrew Torah now available is this Torah of Ezra; the original Torah of God had been lost as have just been explained.
The Old Testament includes most of this Hebrew Torah, after passing into many translations to Greek and Lattin then to English and other languages.
Now, I tell you the punishment of the thief according to Jacob and his sons: the theif will be a slave to the one from whom he stole; i.e. if a thief steals something from a man, then the thief will be a slave to that man.
E.g. Joseph's aunt liked him very much; so she made a trick to keep Joseph with her: she accused him of stealing a statue from her, then she kept him with her. Actually, Joseph was a child and he took that statue to play with; and in fact that statue belonged to his mother. The story is known very well.
Another example: Josephe kept his brother Benjamin with him, by doing a similar trick : he put the gold measure of the king in the bag of Benjamin, then accused him of stealing it; and so he took his brother from the other brethren.
Because according to the king of Egypt, the punishment was to imprison the thief and not to eslave him. And you can read the story in the Book of Genesis.
In the Quran 12:
69-79
وَلَمَّا دَخَلُواْ عَلَى يُوسُفَ آوَى إِلَيْهِ أَخَاهُ قَالَ إِنِّي أَنَاْ أَخُوكَ فَلاَ تَبْتَئِسْ بِمَا كَانُواْ يَعْمَلُونَ . فَلَمَّا جَهَّزَهُم بِجَهَازِهِمْ جَعَلَ السِّقَايَةَ فِي رَحْلِ أَخِيهِ ثُمَّ أَذَّنَ مُؤَذِّنٌ أَيَّتُهَا الْعِيرُ إِنَّكُمْ لَسَارِقُونَ . قَالُواْ وَأَقْبَلُواْ عَلَيْهِم مَّاذَا تَفْقِدُونَ . قَالُواْ نَفْقِدُ صُوَاعَ الْمَلِكِ وَلِمَن جَاء بِهِ حِمْلُ بَعِيرٍ وَأَنَاْ بِهِ زَعِيمٌ . قَالُواْ تَاللّهِ لَقَدْ عَلِمْتُم مَّا جِئْنَا لِنُفْسِدَ فِي الأَرْضِ وَمَا كُنَّا سَارِقِينَ . قَالُواْ فَمَا جَزَآؤُهُ إِن كُنتُمْ كَاذِبِينَ . قَالُواْ جَزَآؤُهُ مَن وُجِدَ فِي رَحْلِهِ فَهُوَ جَزَاؤُهُ كَذَلِكَ نَجْزِي الظَّالِمِينَ . فَبَدَأَ بِأَوْعِيَتِهِمْ قَبْلَ وِعَاء أَخِيهِ ثُمَّ اسْتَخْرَجَهَا مِن وِعَاء أَخِيهِ كَذَلِكَ كِدْنَا لِيُوسُفَ مَا كَانَ لِيَأْخُذَ أَخَاهُ فِي دِينِ الْمَلِكِ إِلاَّ أَن يَشَاء اللّهُ نَرْفَعُ دَرَجَاتٍ مِّن نَّشَاء وَفَوْقَ كُلِّ ذِي عِلْمٍ عَلِيمٌ . قَالُواْ إِن يَسْرِقْ فَقَدْ سَرَقَ أَخٌ لَّهُ مِن قَبْلُ فَأَسَرَّهَا يُوسُفُ فِي نَفْسِهِ وَلَمْ يُبْدِهَا لَهُمْ قَالَ أَنتُمْ شَرٌّ مَّكَانًا وَاللّهُ أَعْلَمْ بِمَا تَصِفُونَ . قَالُواْ يَا أَيُّهَا الْعَزِيزُ إِنَّ لَهُ أَبًا شَيْخًا كَبِيرًا فَخُذْ أَحَدَنَا مَكَانَهُ إِنَّا نَرَاكَ مِنَ الْمُحْسِنِينَ . قَالَ مَعَاذَ اللّهِ أَن نَّأْخُذَ إِلاَّ مَن وَجَدْنَا مَتَاعَنَا عِندَهُ إِنَّـآ إِذًا لَّظَالِمُونَ
The explanation:
(And when they went in before Joseph, he received his brother [Benjamin] privately and said: "Truly I am your brother; so grieve not over their past doing."
Then, when he had provided them with their provision, he put the [gold] drinking-cup [of the king] in the saddle-bag of his brother [Benjamin], then a crier cried: "O men in the caravan, you are thieves."
They said, turning towards them: "What is it that you miss?"
They said: "We have missed the king's cup, and he who brings it shall have a camel-load, and I [said Joseph] guaranty it."
[Joseph's brothers] said: "By God! you know well that we come not [here] to make mischief in the land, nor did we steal before."
[The king's pages] said: "And what shall be the penalty for it, if you prove liars?"
They said: "The penalty thereof is he in whose bag [the cup] is found – he shall be [a slave as] the penalty thereof; thus do we reward wrong-doers."
Then he began [the search] with their sacks before his brother's sack, then he brought it out of his brother's sack.
Thus did We contrive for Joseph; he could not have taken his brother according to the king's law [which decides the prison for the thief] unless God willed.
We raise by ranks [anyone] whom We will, and above everyone with knowledge there is the All-Knowing [Lord.]
They said: "In case he has stolen now, a brother of his own had stolen before!" [They meant by that the story of Joseph when he was accused by stealing the statue]
Joseph kept it secret within himself and did not disclose it to them; he said: "You are the worst in case you have power!" But God knows best the truth of what you allege."
They said: "O exalted prince, he has a very old father [Jacob], so take one of us in his stead; [for] we see that you are pious."
[Joseph] said: "I seek refuge in God that we should take anyone save whom we find our property with. Otherwise we are wrong-doers.")
While Ezra lived in Babylon and the law of Babylon said that the theif who steals a cow, let him give four cows; so he wrote that in his Torah, while the original statement in the original Torah was like the statement in the Quran: to cut off the hand of the thief; but Satan came to Ezra and said to him: this is very cruel for the poor thief; let us make it the thief who steals one cow let him give 4 cows.
But they did not know that the punishment of the thief by cutting off his hand is to prevent any thief from stealing; moreover, if the thief steals one cow, how can he pay 4 cows? – Abu abd-Allah said.