Prophet Joseph’s (Yousuf’s) brothers entered the City and enlightened him on the adversity of their family. They had poor number of goods but they wanted full measure food in return. They asked him because Allah loves charity and the true believers are most charitable.
“So when they entered upon Joseph, they said, “O ‘Azeez, adversity has touched us and our family, and we have come with goods poor in quality, but give us full measure and be charitable to us. Indeed, Allah rewards the charitable.” Quran (Surah Yousaf, 88)