I don’t think that’s necessarily the case. Movies where a child suddenly dies, like in an accident, affect people just as much as when an animal dies, probably more if the person watching has been a parent.
In cases where the death is an elderly person or someone who is terminally ill then usually the movie has them preparing for the death in some way or it’s somewhat expected because they were old or ill. Or they are fighting in a war so again you knew there was a chance they’d die. Or they do something to bring death on themself, like commit suicide or get killed committing a crime.
One thing about animal death is that the animal is often killed in movies in a way that seems very unjust, like the kid’s parents decide it needs to die for some reason, or it’s killed by nasty bullies, so it’s not just a case of the dog naturally got very old and died. The injustice is very upsetting. I think most people are just about equally upset by animal cruelty and cruelty to children/ elderly/ disabled etc because we know a person capable of violence towards an animal would do the same to a child or to another person weaker than them.