From Wikipedia:
“The origins of separation anxiety disorder stem from attachment theory which has roots in the attachment theories both of Sigmund Freud and John Bowlby. Freud’s attachment theory, which has similarities to learning theory, proposes that infants have instinctual impulses, and when these impulses go unnoticed, it traumatizes the infant. The infant then learns that when their mother is absent, this will be followed by a distressing lack of gratification, thus making the mother’s absence a conditioned stimulus that triggers anxiety in the infant who then expects their needs to be ignored. The result of this association is that the child becomes fearful of all situations that include distance from their caregiver.
John Bowlby’s attachment theory also contributed to the thinking process surrounding separation anxiety disorder. His theory is a framework in which to contextualize the relationships that humans forms to one another. Bowlby suggests that infants are instinctively motivated to seek proximity with a familiar caregiver, especially when they are alarmed, and they expect that in these moments they will be met with emotional support and protection. He poses that all infants become attached to their caregivers, however, there are individual differences in the way that these attachments develop. There are 4 main attachment styles according to Bowlby; secure attachment, anxious-avoidant attachment, disorganized attachment, and anxious-ambivalent attachment. (Anxious-ambivalent attachment: when an infant feels extreme distress and anxiety when their caregiver is absent and does not feel reassured when they return.)”