They had left Egypt by this time and were out of bondage (although apparently one or two of them rather liked it!). As they were wandering in the wilderness for nigh on forty years they had plenty of opportunity to trade with local tribes; you know, "Buy a little, sell a little, oyvay, maseltov!