In Saudi Arabia, women must use black clothing covering almost everything. And the reason for that, is that they want to, there are no laws that say that, no religious rule that say that, and men don't enforce that, when a muslim visitor of another country wear muslim clothes but not black for example, Saudi women that will nag you to go change to something black. (or if a woman wear muslim clothing that does not cover the same things, they also get nagged by other women).
That said, I disagree with your statement that religion marginalize women. Maybe, because I am religious myself.