According, to the wikipedia article for illeism:
Young children in Japan commonly refer to themselves by their own name
(a habit probably picked from their elders who would normally refer to
them by name, this is due to the normal Japanese way of speaking where
referring to another in the third person is considered more polite
rather than using the Japanese words for "you", like Omae) though
as the children grow older they normally switch over to using first
person references. Japanese Idols also may refer to themselves as so
to give off the feeling of childlike cuteness.
Which I think has some truth to it. In Japanese it is more common to refer to children by their name than other languages and also since young women also use it, there is a chance that the child may pick it up by seeing the usage from other people. Also, my own personal opinion is that Japanese is very complicated when it comes to first person and third person pronouns, and that is why children will use their names to avoid having to worry about it. Women generally will stop at an early age although some women might continue using it even up to there early thirties (although people around them might detest it). I think for men, you will only see the usage in very young children (preschool or earlier).
Also, I think it should be known that while English speaking countries find this usage very strange, it is common in other languages such as Thai also.