You are reading a tafsir for the group of verses 12:69 to 12:75

At the time of departure of Joseph’s brothers, Joseph out of kindness put his drinking cup (which was perhaps made of silver) in his brother Benjamin’s possessions. This was not known to Benjamin or to the courtiers. Thereafter, by the will of God, it happened that the royal measure for measuring the corn (which was also perhaps very costly) was misplaced somewhere. When the royal servants did not find it after making a search, they suspected Joseph’s brothers who had left just then. One of the officials called back the caravan. In the course of inquiries they themselves (Joseph’s brothers) suggested as a punishment for theft (which was prevalent among them), according to the law of Abraham, that the thief himself should remain with the owner for a year as a slave.