Mosques have always had their doors open to women from the time of the Prophet Muhammad, peace be upon him. So it is strange and weird to encounter mosques that do not allow women into their precinct.
They may try and argue for their case, but for sure it is contrary to the way of the Prophet himself.
Take for example the following narration:
On the authority of Abdullah bin Hubairah al-Saba’i, he said:
“ Bilal bin Abdullah bin Umar told me that his father Abdullah bin Umar said one day:
“ The Messenger of Allah, may Allah bless him and grant him peace, said:
“ Do not prevent women from their share of the mosques! ”
So I said:
“ As for me, I will prevent my family, so whoever wishes, let him release his family.”
So he turned to me and said:
“ May Allah curse you! may Allah curse you! may Allah curse you!
You hear me say: The Messenger of Allah, may Allah bless him and grant him peace, commanded that they should not be prevented !!! “, and he stood up (and left) angry. ”
The above narration is taken from Jami’ Bayan Al-Ilm of Ibn Abdlebar and it is sound.
It is also found in many works of Hadith like the work of Muslim, Ahmed and others, but with slight differences in wordings. The core meaning “Do not prevent women from their share of the mosques” is preserved in all of them though.
So no surprises there at all. For just like there are Jews who act against the teachings of Moses, peace be upon him, Christians who acts against the teachings of Jesus, peace be upon him; there are also Muslims who act against the teachings of Muhammad, peace be upon him.