Regarding the verse "It is not lawful for you to inherit women against their will, nor to prevent them from marrying in order to take away part of what you have given them, unless they commit a clear indecency" [Nisa 4:19], this was because a man would inherit the wife of his relative and then prevent her from marrying until she either died or returned her dowry to him. So Allah established a ruling concerning that and forbade it.
حدثنا أحمد بن محمد بن ثابت المروزي حدثني علي بن حسين بن واقد عن أبيه عن يزيد النحوي عن عكرمة
{لا يحل لكم أن ترثوا النساء كرها ولا تعضلوهن لتذهبوا ببعض ما آتيتموهن إلا أن يأتين بفاحشة مبينة} وذلك أن الرجل كان يرث امرأة ذي قرابته فيعضلها حتى تموت أو ترد إليه صداقها فأحكم الله عن ذلك ونهى عن ذلك