In Parshat Shmot (Shmot 3:20-22), God promised Moshe: “And I will stretch out my hand and smite Egypt with all of my wonders which I will do in their midst: and after that he will let you go. And I will give this people favor in the sight of Egypt: and it will come to pass that when you go, you shall not go empty (reikam): but every woman shall ask her neighbor, and of her that sojourns in her house, jewels of silver, and jewels of gold, and garments: and you shall put them on your sons and on your daughters; and you shall despoil Egypt.”
In Parshat Bo (Shmot 12:35-36), we see the fulfillment of this promise: “And the children of Israel did according to the word of Moshe; and they asked of the Egyptians jewels of silver and jewels of gold and garments: and God gave the people favor in the sight of Egypt, so that they gave them the things that they required. And they despoiled Egypt.”
God already told Avraham about this future transaction in the “Brit Ben HaBetarim” (Breisheet 15:13-14) “Know surely that your seed shall be a stranger in a land that is not theirs, and shall serve them; and they shall afflict them four hundred years; and also that nation whom they shall serve, will I judge: and afterwards shall they come out with great substance.”
Why was it necessary for the Jewish people to leave with gifts?
Chizkuni comments on the words “and you shall not go empty”: They will endow you with a gratuity of three kinds: silver, gold and clothing, as is the case with a master’s farewell gift to his freed servant (which was taken from the flock, threshing floor and winepress).
We learn about the master’s farewell gift in Dvarim 15:12-15: “And if your brother, a Hebrew man, or a Hebrew woman, be sold to you, he shall serve you six years; and in the seventh year you shall let him go free from you. And when you send him out free from you, you shall not let him go away empty (reikam): you shall furnish him liberally out of your flock and out of your threshing floor and out of your winepress: Of that which the Lord, your God blessed you shall you give him. And you shall remember that you were a bondsman in the land of Egypt and the Lord, your God redeemed you; Therefore, I command you this thing today.”
Cassuto points out: “The Hebrew slaves had worked for their masters for the number of years preordained by Providence. They are entitled to their freedom and therefore at the same time to the farewell gratuity. The law or rather absolute justice demanded it.”
We see from here that the “gifts” were just a small portion of what was owed to them for being mistreated and serving as slaves for so many years.