A degree of selflessness is needed to do this. The insecure child is unlikely to develop much in this area, because his focus is so much on his own needs, his own survival. They are too consumed with their own survival. Empathy is not impossible to achieve in institutional settings, but the odds are against it. But in the secure setting of the home, where each child knows he is loved and accepted, empathy can flourish.
Parents can teach and demonstrate the ability to relate to others, and the odds are on their side.
If his little sister falls and hurts herself, no bell will call him away from comforting her. If Grandma is feeling lonely, he is completely and naturally free to talk to her on the phone as long as he wishes, and as long as she needs. Empathy thrives in a natural setting. It fights for its life in an institutional setting. Next there is Impulse Control.