Imagine that I handed you an ice cream cone with one hand and made a fist with my other hand and drew it back as if to hit you. What would you probably feel? …
Some level of anxiety if you thought you might get hit. Now imagine that the next few times someone handed you an ice cream cone, the same thing happened and you felt anxious each time.
What do you think you would feel the next time you were handed an ice cream cone, even if there was no menacing fist? … Probably anxious.
The principle is that anything that occurs repeatedly (or even once if the incident is traumatic enough) at the same time that something else is causing an emotion will itself get conditioned to produce the same emotion.
That’s how making mistakes, being criticized, not meeting expectations, being rejected, and a host of other situations that are not inherently scary get conditioned to produce anxiety (or some other emotion, such as anger).
This process is also the primary cause of Post Traumatic Stress Disorder.