He, sallallaahu 'alayhi wa sallam, raised them from their childhood to avoid impermissible things:
Abu Hurayrah narrated that Al-Hasan ibn 'Ali took a date from some dates for charity and put it in his mouth, so the Prophet of Allah, sallallaahu 'alayhi wa sallam, made the sound: "Kakh, Kakh!" for him to spit it out. He, sallallaahu 'alayhi wa sallam, then said to him: "Didn't you know that we do not eat from charity?"
The narration shows that children should not do something that is prohibited upon adults, and this is the responsibility of the guardian. It also shows that they should be disciplined to do what benefits them, and to stay away from prohibited things that harm them, even though they are still not held responsible for it.