Actually, this is incorrect. There is no mention made of this, or any other, "dress code" in the Koran. It is not a religious imperative but rather a societal quirk. This is why women in Iran simply cover their hair with scarves, Muslim women in Turkey and Bosnia observe no dress standard whatsoever, and women in Saudi Arabia observe the head-to-toe "rule."
When was it that women in western cultures stopped adhering to the unwritten "covered head" rule? If you think about it, women of pretty much any social class always covered their heads, some with bonnets, some with hats, some with kerchiefs...eventually, it became soemthing that women did only when in church. You don't really see it in church any more.
Honestly, I think it just went out of fashion. Men used to wear hats fairly frequently too.