Rashi implies earlier (quoting Ta'anit 10b) that the Yaakov's family wasn't subject to the famine. He had plenty of Ya'akovmoney and was not affected byin the famineprocess of purchasing grain, and they went downwhich was for sale to the public, from Egypt to buywhen Joseph revealed himself. Perhaps if he had no more money or grain only so theywas no longer for sale it would not attract negative attention from the surrounding people (who were going hungry)have been forbidden. Since Ya'akov's family was not suffering from the famine
Furthermore, it was perfectly permissible for Levithere are commentators who posit that Yaakov miraculously had plenty of food and only sent the brothers to conceive a daughterpurchase food so neighbors won't be covetous of him.