Exodus 20:2 "I am the LORD your God, who brought you out of the land of Egypt, out of the house of slavery.
The land of Egypt, the iron furnace, is well-known as a picture of the slavery to sin and the dominion by the wicked snake-prince of this world. Under the illusion of creating a glorious empire, the people are subject to a harsh reality of brutality and despair.
Yet the reason the people of God are in the land of Egypt does not seem to be the same as the one they end up being sent to Babylon. In the latter scenario, it is very clear that the people have been willfully engaging in rebellious behaviour against the Living God, participating in every possible sinful activity - until sin reached its full potential - and the consequence of that gestation was exile - being cast away from the presence of God (represented by His dwelling in the holy temple).
However, no such obvious rebellion has occurred for the people to end up in Egypt. Why are they there - what did they do to deserve such harsh treatment for this prolonged period of time? We know that slavery in the spiritual sense is indeed because of sin, and Satan then is given full authority over those that would allow his whispers to enter into their hearts.
The reason for Israel being in Egypt seems to be one of famine.
Genesis 41:57 Moreover, all the earth came to Egypt to Joseph to buy grain, because the famine was severe over all the earth.
Indeed a global famine, such that all the earth comes under the dominion of that old Pharaoh. But perhaps the famine was instituted by God so that the whole world would come under the reign of Joseph, God's Elected Prince.
Now if we then back-track to the reason Joseph is in Egypt, it is because of the murderous intentions of his brothers -
Genesis 37:20-21 Come now, let us kill him and throw him into one of the pits. Then we will say that a fierce animal has devoured him, and we will see what will become of his dreams."
Thus there is one sin that has indeed in some sense caused their 'exile' from Canaan to Egypt - and it is the murder of God's Elected Prince.
John 3:18 Whoever believes in him is not condemned, but whoever does not believe is condemned already, because he has not believed in the name of the only Son of God.
The sin of Adam is the same sin of all of us, the sin that we will all be judged for on that day - and it is the rejection, or the murder of the Christ.
Genesis 50:20 As for you, you meant evil against me, but God meant it for good, to bring it about that many people should be kept alive, as they are today.
The rebellion of a few against the Messiah was commuted to all, so that all may have life an provision in Him, the new prince of the world.
Now as our champion who we once crucified, He holds it not against us and declares:
Genesis 50:21 So do not fear; I will provide for you and your little ones." Thus he comforted them and spoke kindly to them.
Isaiah 55:1-3 "Come, everyone who thirsts, come to the waters; and he who has no money, come, buy and eat! Come, buy wine and milk without money and without price. Why do you spend your money for that which is not bread, and your labor for that which does not satisfy? Listen diligently to me, and eat what is good, and delight yourselves in rich food. Incline your ear, and come to me; hear, that your soul may live; and I will make with you an everlasting covenant, my steadfast, sure love for David.