They used to be punished during the time of the Messenger of Allah ﷺ if they bought food in bulk and then sold it on the spot before transporting it to their own quarters.
أنهم كانوا يضربون على عهد رسول الله ﷺ إذا اشتروا طعاما جزافا، أن يبيعوه في مكانهم حتى يؤووه إلى رحالهم.
Bukhari narrated it in the Book of Punishments (6852), and Muslim narrated it in the Book of Sales (1527: 37), both from the hadith of Abdul-Ala, who said, Mamar narrated to us, from Zuhri, from Salim, from Ibn Umar, and he related it. The wording given is that of Bukhari, and Muslim's wording is similar.