Urwah (may Allah have mercy on him) narrated (it was the custom before Islam) that when a man divorced his wife, he would take her back before her waiting period (‘iddah) ended, and even if he divorced her a thousand times, he would return to his wife and then divorce her again. Whenever her ‘iddah was about to end, he would take her back and then divorce her again, then say: “By Allah, I will neither keep you nor will I completely let you go.” So Allah the Exalted revealed this verse: “Divorce is twice; then, either keep [her] in an acceptable manner or release [her] with good treatment.” (__QUR_N__ al-Baqarah: 229) After the revelation of this verse, everyone, whether they had divorced or not, began to observe the rules of divorce anew.
Hadith Referenceمسند الإمام الشافعي / كتاب الرجعة / 1278