This is in accordance to behavioral conditioning. Originally, the white uniform of the nurse has no associated stimuli for the patient, that's why the baby will not react in fear upon seeing the white uniform for the first time. But since the nurse introduces a painful stimuli (i.e. injection) to the baby, the baby will then associated the painful stimuli to the harmless stimuli which is the white uniform. The white uniform will now be a conditioned stimulus; wherein all nurses or all persons in white uniform will trigger fear to the patient, even without the original painful stimulus.