The ruler is just and that is why this law. In case of the earlier ruler a woman of 62 years of age and a mother of five was turned out of the house with just three words.
"Shah Bano, a 62-year-old Muslim mother of five from Indore, Madhya Pradesh, was divorced by her husband in 1978. She filed a criminal suit in the Supreme Court of India, in which she won the right to alimony from her husband. However, the Muslim politicians mounted a campaign for the verdict's nullification. The Indian Parliament reversed the judgement under pressure from Islamic orthodoxy."
"On November 1978 her husband gave an irrevocable talaq (divorce) to her which was his prerogative under Islamic law and took up the defence that hence Bano had ceased to be his wife and therefore he was under no obligation to provide maintenance for her as except prescribed under the Islamic law which was in total ₹5,400 (USD 77). In August 1979, the local court directed Khan to pay a sum of ₹25 per month (US 38 Cents) to Bano by way of maintenance. On 1 July 1980, on a revisional application of Bano, the High Court of Madhya Pradesh enhanced the amount of maintenance to ₹179.20 per month (USD 2 & 50 Cents). Khan then filed a petition to appeal before the Supreme Court claiming that Shah Bano is not his responsibility anymore because Mr. Khan had a second marriage which is also permitted under Islamic Law."
Mohd. Ahmed Khan v. Shah Bano Begum - Wikipedia