Her action probably was fostered mainly by relief that she was not going to get a shot. But obviously she felt friendly toward the doctor. Not all children regard adults with such open affection.
Many children warm up to adults slowly as they discover that adults are pleasant and trustworthy.
Others carry suspicion and mistrust of people into adulthood. We do know that children's experiences with family and everyone else play some part in their social growth. It is at home that children first gain ideas about what adults are like. They learn by watching how their mother and father behave in their roles as parents, how they behave toward each other, and toward other people. Of course, children react differently depending upon their personality and feelings about themselves.