This is called the “Right Hand Head Rule”; that is, the rightmost member of a compound in languages like English and German (almost) always acts as the “head”, the member that determines the grammatical information of the entire compound.
There are also many languages, such as Hebrew, with a Left Hand Head Rule, in which the leftmost member is the head. (Also Thai, as seen in a comment above!)
Robot - Der Bipenböpenmann
It’s >der< Bipenböpenmann, please. “Mann” is grammatically masculine, so all composite words of it are, too.
This is called the “Right Hand Head Rule”; that is, the rightmost member of a compound in languages like English and German (almost) always acts as the “head”, the member that determines the grammatical information of the entire compound.
There are also many languages, such as Hebrew, with a Left Hand Head Rule, in which the leftmost member is the head. (Also Thai, as seen in a comment above!)