The liberalism in religious law is something that many people often fail to appreciate, whether adherents or outsiders.
For example, the much-maligned prescription of "an eye for an eye" is merciful compared to human nature, and the violence that preceded that law. Before the law, it was more like "your life for my eye." Similarly, the barbaric Levitical laws on women's rights -- in particular, concerning divorce and rape -- were an improvement. At least there was some possibility of recourse in a few cases. Similarly, while the situation of women in Muslim cultures is terrible, at the time of Muhammed Islam was a huge improvement. The violent society that existed at the time lead to widespread violence against women with impunity.
The prolem is that followers of religions tend to be humans, and therefore interpret the law to suit their own biases. (Of course this never happens in civil society -- <coughcoughshermanantitrustactusedtobustunionscough> -- no, never at all!) So, where the hajib was used as a way to protect women's right initially, it turned into a tool for opression. Where "an eye for an eye" was initially a step toward mercy, it became an excuse for bloodlust.