At length when he had furnished them forth with provisions (suitable) for them, he put the drinking cup into his brother’s saddle-bag. Then shouted out a crier: “O ye (in) the caravan! behold! ye are thieves, without doubt!”
According to Anwar ul Bayan,
In a plan to keep his brother behind with him, when Sayyidina Yusuf (pbuh) “prepared their provisions for them, he placed a drinking cup in his brother’s carriage.” This was the cup that was used to measure the quantity of grains distributed. When the attendants of Sayyidina Yusuf (pbuh) found this missing, they were perplexed, since they did not know what Sayyidina Yusuf (phuh) had done.
“Thereafter an announcer announced (to the brothers), ‘Whereto O caravan! Verily you are thieves!”
Astonished at the accusation, the brothers asked, “What have you lost? They replied, ‘We have lost the drinking cup of the king. (As a reward) There shall be camel’s load for whoever brings it forth..” So that none could doubt the reward, the announcer added, “and I stand guarantee for it.”
The brothers said, “By Allah! You are well aware of the fact that we have not come to cause corruption in the land, nor are we thieves.”
The attendants of Sayyidina Yusuf (pbuh) then asked them if, after investigation, it was proven that one of them did steal the cup, “What will be the penalty for it if you are lying (about your innocence)?”
The brothers replied, “The penalty is this,.. that the very person in whose carriage is found will be the penalty for it.” i.e. The thief will be restrained and kept as a slave. They added, “This is how we penalise oppressors.” In the Shariah that they followed, this was the penalty for stealing.
Madani, Muhammad. Anwar ul Bayan. (vol. 3 p. 77-78). Collection of Quran Commentaries (Tafsirs) – Islamic Web Library