Emotions are the result of biological, inherited algorithms.
Emotional Algorithms
Emotions are the result of internally-wired algorithms.
You take into account the variables of a situation and environment and your body reacts. If you feel fear, it’s because the set of inputs and queues that you’ve perceived, consciously or not, have been processed by some deeply-seeded part of the brain. That part of the brain doesn’t communicate with the verbal part. Its response is much more direct and visceral. Your emotions are the product of the algorithms you were born with. I don’t know if those can change or not.
This is your Adaptive Unconscious.
You can train yourself to understand the signals these algorithms are sending through Interoception training, e.g. Meditation.