If this famine had been only in Egypt, Egypt would have had no fear, because of the grain Joseph [had stored up]. However, there was famine throughout the entire world, and because the entire earth stood in need of [the grain in] Egypt, the grain supply quickly dwindled and became expensive even for the Egyptians. The Egyptians would have consumed the grain at little expense, because of its abundance, if the entire earth had not come down to buy grain there. To make known that the entire earth hungered, [Moses] said, "The entire world came to Egypt to buy grain from Joseph."
Source: COMMENTARY ON GENESIS 36:2