I am trying to learn German and I learned about grammatical gender. It is interesting but quite confusing to me. What is the purpose if it doesn’t denote sex? Why not use one word in place of many? I don’t mean to complain or argue, I just seek understanding to make sense of this, because it is very destracting to a new learner.
(My answer doesn't really answers your question, but it is too long for a comment.)
If your native language is English, you may be surprised, because English had genders in the past (see Wikipedia). Due to some reasons, genders died out and actually that's not something special (for example, French doesn't have neuter anymore, though it had).
German has genders just because the Proto-Indo-European language (the "parent" of all of Indo-European languages) had them. No doubt, today it's complicated question, why inanimate objects are masculine or feminine, when they should be neuter. But in the past there was no such mess: things, what were considered by people as inanimate were neuter; words indicating people were masculine or feminine. And that was convenient.
But with time, things became confused. Verbs that were regular became irregular, genders get mixed up... And not only in German. For example, in my native language (Russian) there are three genders and animacy (altogether six combinations). A word "robot" can be either animate or inanimate (but always masculine) and that's, I think, funny.
I'm not very comfortable with that question. Languages generally have grown over centuries without asking for "purpose" of specific language features. Language tends to be redundant and not minimalistic, and sometimes the redundancy even serves a purpose - like in literature or poetry - As it does in an everyday conversation.
You could just as well ask why does a language need different words for nearly the same thing - "Do we need both 'boat' and 'ship' if we could say 'small ship' and ''ship'?"
All human conversation has a lot of redundancy - think about it in terms of aural redundancy, not necessarily grammatical redundancy. And in spoken conversation this redundancy serves the purpose of just being easier to understand.
There are multiple issues that are solved by having multiple articles. One of these issues is to decide whether a word, that has the same plural form as the singular, is in plural or not, i.e.
Das Mädchen - Die Mädchen (the girl - the girls)
Another problem is homonyms. These are words that are written the same way, but have different meanings. One example would be
Das Schild - Der Schild (the sign - the shield)
Sometimes, both of these issues can be resolved with the help of the context, but not always. In these examples I use
the as universal article.
Ich sah the Mädchen One or multiple?
Sie nahm the Löffel One spoon or multiple?
Er hob the Schild The weapon or his sign he had in the demonstration?
The Heide ist groß heath or heathen?
The See ist gefährlich lake or sea?
"Gender" is not the best word to denote this grammatical category; think of it as being „noun classes“, which may or may not reflect on real categories of things. Some languages have strict connections between noun classes and reality, such as classes for animate and inanimate, or male, female, neuter, or whatever.
In German, you can and should treat them just as irregular verbs or Perfekt with haben/sein: they're just there. You can explain them scientifically, but for foreign language learners, its 'easier' to just learn them.
Personally, I think that the terms male/female/neuter are crap, as they imply a connection which just doesn't exist.
So to answer your question: explain that they are just there for reasons which lie deep in the development of the language, that they have next to no connection to actual biological genders and are called „male/female/neuter“ for stu^H^H^Hhistoric reasons.
About „noun classes“: the most basic definition is, that a language has noun classes if surrounding words such as adjectives have to change according to which word class is used.
The first and most important answer is: English words have a gender too ("Ho! Ho! and up she rises"); cf. this wikipedia article:
She is also used instead of it for things to which feminine gender is conventionally attributed: a ship or boat (especially in colloquial and dialect use), often said of a carriage, a cannon or gun, a tool or utensil of any kind, and occasionally of other things.
It's just that the article "the" doesn't reflect it, so you don't have to think that much. (This is, I think, similar to the situation with grammatical case in nouns.)
If you can explain it for English, you are probably very close to an explanation for German.
The answer of course will have to do with language evolution. In a comment to the OP user unknown pointed to an excellent text -- in German, I'm afraid -- detailing the emergence of gender in the indo-germanic language. Originally, contrary to what I thought, there was no gender; gender emerged first as a distinction between subject and subjected, and later to signify certain abstractions (like procedures, or their result). These developments have left certain visible patterns in today's words' gender; for example, the author claims, it's not a coincidence that many abstractions like Liebe, Kunst, Demokratie are feminine.