It as been shown in the past that babies and toddlers are eager to help, for example by picking up something someone has dropped, if they can't reach it, and handing it back to them. This research showed that 21-month olds would spontaneously help someone who had, the day before, tried to give the baby a toy but hadn't been able to, but they would not help someone who had showed them the toy but not given it to them. Kids help people who previously acted kindly toward them.
This is basic game theory, and it has been found, for example, in lots of birds. The first time you interact with someone (or some bird), you cooperate. The next time, you act however the other person or bird acted toward you the previous time. It seems to come naturally to babies.