The idea with transference, is that we can learn empathy for one group. For example children can learn empathy for their pets, and that empathy will transfer to other children as well.  Or people can learn empathy for family members and that will transfer to strangers.

 is a phenomenon characterized by unconscious redirection of feelings from one person to another. One definition of transference is "the inappropriate repetition in the present of a relationship that was important in a person's childhood".Wikipedia