Qur'anic teachings were designed to ensure the maximum welfare of all family members, so they do not create impossible situations by ignoring the human realities of conflict and divorce.
Pophet Muhammad, peace and blessings be upon him, said, "The world is green and beautiful and God has appointed you as His stewards over it. He sees how you acquit yourselves..." (Muslim).