In class the other day I told my students of what they told me in graduate school. Gender was a language characteristic, a grammatical thing, whereas sex was a biological thing, and they weren't to be confused. That's because some languages marked gender, male or female, on things that weren't alive; some marked them with neuter in some cases, etc. A gender marker was a separate idea from sex or gender as we knew it in the physical sense.
Now in the time since then both words, "sex" and "gender" have changed somewhat in people's interpretation, but the truth behind it is the same. A language's marking is separate from the physical characteristics of the thing marked. Just for example, I said, is there any good reason "book" is male in Spanish?
One student brought up the possibility that there was a good reason in the past, or at least a reason, in this case perhaps that men ruled the world of books at the time it was decided. Yes, but men also ruled the world of ships, and made ships feminine, one woman pointed out.
I said that in our culture we have an ongoing discussion about gendered things, words like "mankind" being applied to everyone, grammatical issues like "everyone brought his/her/their umbrella today" and that the essence of the discussion is that people are being more literal about pronouns and gender-marked things, thus rejecting the idea of using male words for everyone, etc. My question was whether this was happening in other cultures as well.
Two women mentioned that in Spanish, it was an issue how one addresses a group of mixed men and women; the standard rule was that if a group included even one male, it was considered male. One man who speaks German pointed out that in German, new words and borrowed words such as "computer" were all neuter these days.
I found these observations interesting and vowed to do research on the topic. My questions remain; I suspect that it's always an issue and has always been one. I remember noticing these problems immediately upon learning languages like Spanish and French (What do you call a dog that you don't know? or a group of them? Why are books male and windows female? What if you have books and windows together? etc.) or German (How do you decide which 'things' are neuter? Does male + female = neuter, and if not why not?). A glorious can of worms.
I remember the relative randomness of the answers drawing me into the study of language as I suspected that the 'reasons' for such things were actually subtle but powerful forces in our lives. Things happen, languages change, and it can happen fairly quickly over time. My questions (above) remain. I'll do research and get back to you.