The Number 1 Job Of The Brain Is Survival
Education Credit: ZHealth Performance Lorimer Moseley's "Reconceptualising Pain According to Modern Pain Science" first published in Physical Therapy Reviews 2007; 12: 169-178
The brain is mostly dedicated to survival.
Sensory inputs, cultural beliefs, social and work environments, previous experience, expectations about consequences (of danger and/or pain), your current beliefs, knowledge and logic all play a role in the meaning of information coming in, expectation or anxiety of what is to come, and the resulting outputs created by the brain.
If the brain decides there is threat, then it will create protective outputs designed to change your actions and behavior to keep you safe. Those protective outputs include but are not limited to pain, limited range of motion, stress hormones, low immune function, dizziness/vertigo, migraines, depression, anxiety, etc.