The baby has built up a certain model of the outside world in his mind, a certain view of the outside world. If the model fits the outside world, they are satisfied; If it is not, that is, the desired result does not occur, they feel dissatisfied.
If a baby smiles at a familiar face, it means that the face corresponded to some expectation in his mind according to the text.