Anxious and avoidant attachments styles can attract each other.

Attachment theory suggests that how we form emotional bonds in early childhood influences our attachment styles and behavior patterns in adult relationships. According to research by psychiatrist and psychoanalyst John Bowlby and developmental psychologist Mary Ainsworth, there are three main types of insecure attachment: anxious, avoidant, and disorganized.
People with an anxious attachment style and those with an avoidant attachment style are often attracted to each other. Why does this attraction happen when it appears that these attachment styles have such different needs?