Abraham and Sarah are heroes of the faith, but they made plenty of mistakes along the way. One of the most serious of them was the decision by Sarai to offer her slave Hagar to her husband Abram as a 2nd wife in the hopes that a son born to Abram and Hagar could be considered her son by adoption. This way an effort to "assist" the fulfillment of God's promise. Here's the thing: God doesn't need immoral help to accomplish his will.
In the end, the plan works in that Hagar bears Ishmael, but is a disaster in all other respects because it spawns a bitterness between Sarai and Hagar. In the end, God intervenes to protect Hagar and her son, preventing Abram and Sarai's mistake from going further off the rails.