How and when muscles contract after injuries and accidents is a major area of study. All we have at this point are theories to guide us. More research is needed to find the real answers.
According to one model, pain causes one group of muscles to decrease activity. Then the opposite muscles increase their activity. Sometimes other "helper" muscles contract at the same time. In the neck area, these helper muscles are called accessory muscles. They include the upper trapezius, sternocleidomastoid, and anterior scalene muscles.
Coordination of the neck and shoulder muscles gets off-balance after a neck injury. Pain keeps the body from getting back to normal. Biofeedback is a good treatment choice to help regain normal motor control.