German "her" in dative
I noticed that "ihr" is the same in dative cases "Ich gebe ihr den Apfel". Shouldn't this be "ihrem" instead? Is this a pure exception of the German language or is there a larger picture I'm not seeing in their grammar?
In your sentence the apple is the object (dative) and "ihr" is just the personal pronoun https://en.wikibooks.org/wiki/German/Grammar/Pronouns
The form "ihrem" is only for cases when "sie"(she) is the object of the sentence.
ich gebe ihren Apfel... would mean the apple belongs to her and you are going to give it to... whom (reciver is missing)? (for dative: whos apple are you giving to someone? hers)
in case of ihrem it could imply you are going to do something with the apple which belongs to her.
like: ich mache Obstsalat mit ihrem Apfel- i will make a fruitsalat using her apple. (dative: whos apple am i using? hers)
or: ich gebe ihrem Apfel- means you are trying to give something to the apple which belongs to her- makes the apple (her apple) the receiver of... what? (dative: whos apple is the receiver? hers)
so if she is the receiver (and the apple the object) it has to be ich gebe ihr den Apfel.