The brothers left enough provisions behind for Judah, who stayed at a tavern awaiting the fate of Benjamin. In the meantime, Joseph kept Benjamin in his house as his personal guest and told him how he had devised the plot to put the king's cup in his bag, in order to keep him behind, so as to protect him. He was also glad that Judah had stayed behind, as he was a good-hearted brother. Joseph secretly arranged to watch over Judah's well-being.
Joseph's plan in sending the others back was to test their sincerity, to see if they would come back for the two brothers they had left behind.
Related Quran Ayaaths of this Hadith.
Surah 6 : Ayah 84 Surah 12 : Ayah 96 Surah 12 : Ayah 99 Surah 12 : Ayah 100 Surah 12 : Ayah 102 Surah 12 : Ayah 111"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari