Hagar was a surrogate mother, not a wife. The technology wasn't at today's level.
B’resheet (Genesis) 16:11-12
And the angel of the Lord said to her, “Behold, you will conceive and bear a son, and you shall name him Ishmael, for the Lord has heard your affliction.
And he will be a wild donkey of a man; his hand will be upon all, and everyone’s hand upon him, and before all his brothers he will dwell.”
To this day this prophecy remains in effect.
All of this turmoil because Abraham couldn’t keep his Johnson in his pants.
Genesis 15:18
“In the same day the Lord made a covenant with Abram, saying, Unto thy seed have I given this land, from the river of Egypt unto the great river, the river Euphrates:”
Moses was not allowed to enter the land promised to the Children of Israel, west of the Jordan to the “wadi of Egypt”, an area much smaller than Nile to Euphrates. The larger area outside of the Promised Land belongs to the Children of Ishmael.