why woman is not allowed to become Imam (leader)

In Judaism, there are a lots of Prophets who are women (like Sarah, Hanna, Debhora etc), in African religions there were also a lots of women who were prophets, in Northern religions (the Volvas ) and so many others ...

It is clear that a patriarchal society needed a man as prophet but all the societies in the history of humanity were not necessarly patriarchal