It just doesn’t make sense why a woman’s fast can become invalid when they start menstruating, even just ten minutes before the sun sets. If ritual impurity was the point, how come someone in a state of Janabah can still fast, even if they were to abstain from doing ghusl for a week?
It’s because hating women is a common theme in the Abrahamic religions.