Narrated Abu Said Al-Khudri The Prophet said, “Isn’t the witness of a woman equal to half of that of a man?” The women said, “Yes.” He said, “This is because of the deficiency of a woman’s mind.”
Sahih al-Bukhari 2658
Vol. 3, Book 48, Hadith 826
The reason for this is that Allah decided to make all women menstruate, suffer pregnancy and become stupid as a punishment for Eve’s transgressions in the garden.
His Lord called out to him: Adam, is it from Me that you are fleeing? Adam replied: No, my Lord, but I feel shame before You. When God asked what had caused his trouble, he replied: Eve, My Lord. Whereupon God said: Now it is My obligation to make her bleed once every month, as she made this tree bleed. I also must make her stupid, although I created her intelligent (halimah), and must make her suffer pregnancy. Ibn Zayd continued: Were it not for the affliction that affected Eve, the women of this world wound not menstruate, and they would be intelligent and, when pregnant, give birth easily.
Al-Tabari, Vol. 1, pp. 280-281