IMO there are three reasons; religious, cultural and economics for the unfair treatment of women.
From the 7th century and until well into the 18th century, women had more rights in Islamic societies than in any other religion or country. Alas with the end of Baghdad Caliphate, Ijethad was banned and evolution of Islamic thought frozen.
Islam of today is therefore stuck somewhere in the middle ages. Primary reason being that progressive Mu'tazalites lost and the conservatives led by Imam Hanbal and later by Ibne Timyah won. In my view women living during the time of the holy Prophet (PBUH) were more educated and had more rights than those in the 21st Century Afghanistan under Taliban rule.
Culture always has been a major influence on the religious practices. Imam Ibne Timiyah correctly observed that even though non Muslim Turks/Mongols converted to Islam, they kept many of their cultural values and practices intact. This is clearly evident in Pakistani society were many of the customs and ceremonies belonging to Hindu culture are still prevalent.
For example in Pakistan it is still considered improper for widows to remarry though very common in Arab culture. In Punjab and Sindh, you not only part with your daughter; you are expected to also give lots of goodies with her in dowry; essentially a Hindu culture practice. In most other Muslim areas, including tribal areas of Pakistan, you got to pay ‘Bride Price’ or Haq Maher before you are allowed to take your bride home.
I disagree with the example of homosexuality quoted by Hon. H2O3C4Nitrogen.
Despite the fact that homosexuality is forbidden in all religions especially in Islam; societies where male/female intermixing is rare, homosexuality is common. It would be hypocritical to deny practice of homosexuality in Afghanistan and Pashtoon areas of Pakistan. I have come across its instances in Arab countries as well. Iranian members will acknowledge that residents of the city of Qazvin are supposed to be notorious for it. Only difference being that in the West it is now socially accepted but in other countries it is hidden under the carpet.
Cultural traditions such as ‘Vanni’ or marriage with Quran are accepted by ostensibly religious people even though totally against Islamic laws. Even today marriage to someone belonging to lower status tribe or cast is considered an insult in rural areas but no religious scholar or Mullah dares to utter a word against it.
In the end all thing are ruled by the economics. Social scientists realized long time ago that what really counts is economic independence.
As long as women are kept uneducated and totally dependent upon their husbands/ fathers; they would remain under control and quitely accept whatever is borne on them. As soon as woman is capable of earning an independent living, she would refuse to accept unjust and unfair treatment by her husband or even her father. This is the real reason why Taliban and Wahabis are against educating women.
After fairly extensive observations of the day to day practices in Pakistan, Iran and in Arab countries; I have come to the conclusion that societies in general bend/interpret Islamic laws to suit their requirements. Over the years, pre Islamic cultural practices become accepted as part of religious traditions.
Except in some pockets of the major cities such as Karachi and Lahore; in most areas of Pakistan condition of women is deplorable. Though a few cases of ill treatment come to light thru the media; only Allah knows how many go unreported. I salute all my Pakistani sisters who make a name for themselves despite all the injustice.