Why are women considered untouchable and have to refrain from performing religious activities during menstruation?

First off I'm not a Hindu, just an exmuslim. But I'm Indian and have some questions because some aspects of Hinduism is interesting to me. I mean no offense and I apologize if I seem offensive. It's just that the taboo for periods in Hinduism reminds me of a similar thing in Islam. Muslim women are prohibited from praying, reading and touching the Quran when they're menstruating because it's considered impure. They also have to perform a ritual when they're done menstruating to "purify" themselves. I find this misogynistic and superstitious beliefs.

I have a Hindu friend and today and she was sad because her period started during navratri. She said her family considers periods impure and a time when women are not allowed to perform religious activities like going to the temple and reading holy books etc. Women are also not allowed to go in the kitchen and have to rest until their period is over. When I went to India I also noticed that some families even consider women "untouchable" during menstruation to the point that they have to eat separate food, wash their own clothes and hide away from the rest of the family members. Periods are considered so taboo that women have to stay in menstruation huts in Nepal. Also I saw somewhere that there's a menstruating Goddess in Hinduism, Kamakhya Devi so I find it odd that Goddesses also bleed but women on earth are shamed for this.

My question is why? Tbh I don't think periods are impure at all. Menstruation is essential for pregnancy, giving life in the world. So why are women prohibited from going to the kitchen and performing religious activities? What does Hinduism say about menstruating women? I apologize for this long post.