system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why did languages start to gender words, especially categorizing most objects as male or female?

This came up in a recent discussion amongst a few English professors, none satisfied with they could come up with.
gpt
It's not known, but there is some speculation.

Essentially, the various grammatical markers that indicate grammatical gender may be ultimately derived from the language's words for "man" and "woman", or "he" and "she", for example, originally only used for people, then all animals. This then became a way to categorize other nouns as well.

Somtimes, the connection is not too hard to understand. For example, in ancient societies there were gods and goddesses associated with all sorts of things. The sun might be seen as having male qualities -- it's strong at any rate -- and so to the Romans, Sol, the sun-deity, was clearly a male god, which is why, for example, the French word for "the sun", "le soleil", is masculine; the moon, on the other hand, being much more gentle, was ruled by a goddess, Luna, hence the French word for "the moon", "la lune", which is feminine.

Another way of assigning grammatical gender is by the form of the word itself. Once you have established a list of masculine words and a list of feminine words, you might notice that masculine words follow a certain pattern, while feminine words follow a different pattern. So you allocate new words a gender depending on whether they follow a typical "masculine" pattern or a typical "feminine" pattern. In Russian, for example, words ending in a consonant are usually masculine, words ending in "-a" or "-ya" are usually feminine, and words ending in "-o" are usually neuter.

This explains the famous example of the German word for "girl" being neuter. The German word referred to is "Mädchen". This comes from the (now old-fashioned) word "Magd", which is feminine and means "maid". The "-chen" ending is what's called a diminutive, and translates as "little" -- so "Mädchen" means "little maid", and is where we get our word "maiden". But in German, all words with diminutive endings are automatically neuter, no matter what they refer to.

By this stage, of course, grammatical gender is a completely different concept from actual gender or sex, and is really just a classification system and no longer an indication of whether something is male or female.

English has now come full circle, and we use "natural gender", meaning that women and female animals are feminine, men and male animals are masculine, and inanimate objects are neuter.

There are some exceptions; for example, ships are often referred to as "she", probably because the crew depends on her to keep them alive and safe, but she can be difficult to control (these are stereotypical female qualities, of course).