(19–21) “O you who believe, it is not lawful for you to inherit women against their will. Nor should you mistreat them in order to take back part of what you have given them, unless they commit manifest indecency. Live with them honorably. If you dislike them, it may be that you dislike something in which Allah has placed much good.”
During the Age of Ignorance, when a man died leaving a wife, one of his relatives—such as his brother, cousin, or the like—would consider himself more entitled to her than anyone else and would prevent other men from marrying her, whether she wished it or not.
If he desired her, he would marry her for a bridal gift of his own choosing rather than hers. If he did not desire her, he would prevent her from marrying and would marry her only to someone of his own choosing. At times, he would refuse to marry her off until she surrendered to him part of what she had inherited from his relative or part of her bridal gift. A man would also mistreat a wife whom he [happened to] dislike in order to take back part of what he had given her. Allah therefore forbade the believers all these practices, except in two cases: when the woman willingly chooses to marry a relative of her first husband, as implied by the words “against their will”; and when women commit manifest indecency, such as adultery, obscene speech, or causing harm to their husbands. In the latter case, the husband may place her under pressure as punishment for her conduct so that she will ransom herself from him, provided the pressure he exerts remains within the bounds of justice.
He then said, “Live with them honorably.” This includes honorable conduct in both word and deed. A husband must therefore treat his wife honorably by keeping good company with her, refraining from harming her, showing her kindness, and treating her well. This also includes maintenance, clothing, and the like. A husband must provide his wife with what is customarily expected from a man of his standing toward a woman of hers, in that particular time and place. This varies according to circumstances.
“If you dislike them, it may be that you dislike something in which Allah has placed much good.” That is, husbands should retain their wives in marriage even if they dislike them, for there may be much good in doing so. Among that good is obeying Allah’s command and accepting His counsel, in which lie happiness in this world and the Hereafter.
Another benefit is that compelling himself to remain with her despite not loving her entails striving against his own inclinations and cultivating noble character. The aversion may also disappear and be replaced by love, as often happens. He may also be blessed through her with a righteous child who will benefit both parents in this world and the Hereafter. All of this applies when remaining together is possible and entails no harm.
If separation is unavoidable, however, and there is no basis for remaining together, then doing so is not obligatory.