It is necessary for the survival of the species that children are born selfish, they need to devote themselves entirely to the process of getting bigger and stronger in order to increase their chances of survival.
Our genes have a big influence on our intellect, and appearance but empathy is a learned skill, which has to be imparted to the child over time by it's primary caregivers, that being said the building blocks for empathy are in place at an early age, in a room full of babies if one starts crying soon the others join in, true understanding that other people have feelings doesn't start till about 18mths , you can see a child at this age offering toys or hugs to another child but this is not fully developed empathy, any one who has been in charge of a child of 4 or 5 only to have them demand loudly why someone was so fat or ugly knows that a child of this age has no concept of hurting someones feelings. At about 5 to 10 years they start to understand that how you feel when something bad happens to you is how they feel when something happens to them. From 10 years on they should have a more sophisticated degree of empathic ability and should be able to comprehend more subtle concepts like somebody being left out of a game.
Children aren't born good or evil they are not completely blank slates either, there are certain factory settings in place, but after that the programming is dependant on both the natural capacity of the individual and the information it receives over the course of development.