Back when the Qu'ran was written people only lived to be like 40. It was common then for women to be having kids at that age then with 20 year old men.
What people don't realize is that now that we live twice as long the rule isn't really applicable anymore.
It has its reasons. Back in the 1800s it took men a long time to save up enough money for a house, which is why 18 year old girls would marry 30 year old men. Basically men and women would keep remarrying whenever a spouse died. If a man is married with 5 kids and the wife dies, it was too much for him to raise the children while going to work, so he would marry again. As for women, if their husband died than they would remarry so they'd still have an income. Women weren't legally to own real property until just over 100 years ago.