That is not true.
For example middle east people believe that women should not display themselves in public, on the other hand they DO should display themselves at home for their husbands, this led to some curious architecture, where homes have one "public" area, where visitors are welcome, and women show up covered, and a "private" area, that depending on the home not even male adult sons of the family is allowed, where women can stroll naked or almost naked. (this when dialed up to eleven that results into the "Harem" that for necessity reasons need male people working on it, thus the eunuchs)
In Egypt the reason for why a women should cover herself still apply: people (specially desert semi-nomads) still kidnap beautiful women. Since covered women you do not know if they are beautiful or not, they don't kidnap them.
Arabs are specially wary of Tuaregs, Arabs perceive them as women kidnappers, and I think that perception is not all illusion.
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.