Where did the concept of grammatical gender come from?
The words for female and male humans take after the nouns, not the other way round, so it’s basically because women tended to be thought of in terms of their attributes and men in terms of what they did.
.. Besides European and Semitic languages, most languages don’t have gender – it’s mainly a European and North Indian phenomenon.