The Qur’an establishes this law in 2:230. The logic behind this is for the husband not to take divorce lightly and keep divorcing his wife. It’s not a game. If he divorces her once, he can go back to her during the Iddah period. If he divorces her a second time he can also go back to her. But then if he divorces her a third time, she cannot be lawful to him and he cannot remarry her until she marries another man, and that man divorces her, then she can remarry her previous husband. This law is more of a deterrent so men don’t play games and keep divorcing their wives so many times. A man must know that if he divorces his wife a third time, he won’t be able to go back to her until she marries another man. This is an effective deterrent for many men.