Those children are people with physical bodies. So Jesus himself became like those people and had the same experiences people have. Jesus did this so that, by dying, he could destroy the one who has the power of death. That one is the devil.
For this reason Jesus had to be made like us his brothers and sisters in every way. Jesus became like people so that he could be their merciful and faithful high priest F14 in service to God. Then Jesus could bring forgiveness for the people's sins.