A child's crying is partly a reflex connected with pain, partly an act performed in the pursuit of pleasure. At first, of course, it is only the former. But since any real pain that the child may be suffering must, if possible, be removed, it is inevitable that crying should come to be associated with pleasant consequences. The child therefore soon begins to cry because it desires a pleasure, not because it feels a physical pain ; this is one of its first triumphs of intelligence.
Source: On Education, especially in early childhood, 1926, by Bertrand Russell
More info.:
https://russell-j.com/beginner/OE03-050.HTM
#Bertrand_Russell