Now Sarai, Abram’s wife, had borne him no children. But she had an Egyptian slave named Hagar; so she said to Abram, “The Lord has kept me from having children. Go, sleep with my slave; perhaps I can build a family through her.”
Abram agreed to what Sarai said. So after Abram had been living in Canaan ten years, Sarai his wife took her Egyptian slave Hagar and gave her to her husband to be his wife. He slept with Hagar, and she conceived.
When she knew she was pregnant, she began to despise her mistress. – Genesis 16:1-4
The story of Abram and Hagar is important for the later development of Judaism and the gospel. Hagar and her seed will be linked to enslavement to the law (Gal 4:21-26). It is not without irony that Hagar is from Egypt given the historical relation of slavery to Egypt (Exo 1-2). From a canonical perspective, the original audience of Moses would have been shocked to see their patriarch trying to fulfill the promise through Egypt.
In a similar fashion, this is Abram trying to fulfill God’s promises through law. Despite God’s promise, Abram and Sarah decided to fulfill it in their own strength and way against the counsel of God. This is a recapitulation of the fall of Adam and Eve. It also predicates Israel’s rejection of the gospel to seek righteousness through the law (Rom 9:30-33).