Imagine you have 2 female and 3 male friends and you want to refer to all of them!
For example, you want to say: I love all my friends (all 5). How do you say such a thing in German?
Ich liebe alle meine(r) Freunde.
oder
Ich liebe alle meine(r) Freundinnen.
A bit confusing!