Egypt, as a place and as a nation, is one of the most frequently mentioned names in the Bible. From the time when Abram went down to Egypt in a famine, to baby Jesus' flight to Egypt, it spans Genesis to the Gospels. Egypt became a byword among the Israelites, and its prominent place in Scripture is not easy to ignore.
An early mention of Egypt occurred in Genesis 12:10, when Abram was struggling to survive a famine, and he made the journey to Egypt to escape the severest part of the famine. This indicates that Egypt was seen as a place of prosperity. Later, this was where the Hebrews were forced into slavery before they were led out of captivity by Moses (raised an Egyptian himself). This Exodus from Egypt became a major part of the Israelites history and culture.
Joseph fled to Egypt with Mary and baby Jesus to escape Herod’s massacre of all baby boys below the age of 2 in Bethlehem. They later returned to Israel, fulfilling the prophecy that the Messiah would come out of Egypt, an act foreshadowed by the Exodus much earlier.