"And Sarai, Abram's wife, took Hagar" — she took her with words. Thus she said to her: "Happy are you if you marry this righteous man" — because she did not want to take him on account of his being old. "At the end of ten years" — from here they said that a man is obligated to marry another woman if he has remained with his wife ten years and she has not given birth. "Of Abram's dwelling" — from here they said that only ten years of dwelling in the land of Israel count for him. "To him as a wife" — and not as a maidservant.
Why Sarai Persuaded Hagar to Wed Abram After Ten Years
Midrash Aggadah, Genesis 16:3
ותקח שרי אשת אברם את הגר. לקחתה בדברים, וכן אמרה לה אשריך אם תנשאי לצדיק הזה, לפי שלא היתה רוצית לקחתו מפני שהוא זקן: מקץ עשר שנים. מיכן אמרו שחייב אדם לישא אשה אחרת אם שהה עם אשתו עשר שנים ולא ילדה: לשבת אברם. מכאן אמרו שאין עולה לו אלא עשר שנים של ישיבת ארץ ישראל: לו לאשה. ולא לשפחה: