Hagar was the surrogate for Sarah. She had Ishmael, which was not the covenant design. Sarah eventually had the son of promise, Isaac, but she felt that Ishmael mocked him. She demanded that Abraham send her away. In this situation, Abraham was conflicted. He had two sons, but only one of them was the true heir, the true son of promise. God instructed Abraham to do as his wife told him, for the covenant of blessing and promise would be fulfilled through her seed.
Once again, trouble arose from the previous attempts to “help God.” We have discussed the whole Ishmael/Islam issue already. However, another issue comes to mind here. Abraham had a choice to favor his wife or to favor his wife’s maid. When you make a pledge to a wife, God will always expect you to put her above every other woman, no matter the circumstance, Even though Sarah had muddied the waters of future dealings between nations, God landed on the side of marriage and of covenant.
Another thing to address is this: Although Ishmael was conceived and born under the wrong set of circumstances, God still promised to bless him. When couples have children out of wedlock, or through and affair, it is tough on that child, as it was for Ishmael. However, that does not mean that God hated Ishmael. In the same way, God will redeem even that which is conceived in sin. We just need to give it to God fully, and He will heal.
The latter part of this passage points to Abraham’s gaining favor with men. He covenanted with Abimelech regarding a well, and was favored in Abimelech’s eyes. We will find favor with men as we obey God and follow His guidance.