Anas (radi Allahu anhu) reported that he passed by some children and greeted them. Then he said: “The Messenger of Allah (sal Allahu alaihi wa sallam) used to do the same.”
[Sahih Al-Bukhari and Muslim]
By greeting children, we please their hearts and also vent our modesty. Besides, the importance of As-Salam is unconsciously felt by them.
Above all it is the Sunnah of the Messenger of Allah (sal Allahu alaihi wa sallam) and so we are supposed to put it into practice.
And Allah knows best!