Surah Yusuf

12:75

قَالُوا۟ جَزَٰٓؤُهُۥ مَن وُجِدَ فِى رَحْلِهِۦ فَهُوَ جَزَٰٓؤُهُۥ ۚ كَذَٰلِكَ نَجْزِى ٱلظَّٰلِمِينَ

[The brothers] said, "Its recompense is that he in whose bag it is found - he [himself] will be its recompense. Thus do we recompense the wrongdoers."

Tafsir 12:75

Joseph’s brothers said that the payment for any thief among them was that the person in whose bag the stolen item was found would become the slave of whoever he stole from. This punishment of being made into a slave is the way they punished thieves.