Why do people who suffer head trauma get stiff limbs immediately afterward?

I’ve noticed that people who get hit in the head badly tends to stiffen up.

What is the mechanism of action?
Does stiffening up indicate something in terms of the consequences of the head trauma?

Examples:
ACHTUNG! Safe for work but, you know, people getting badly hurt:

I didn’t watch the videos here at work but one mentions seizures in the title. The head trauma can cause a seizure - which involves involuntary muscle contractions. Is that what you’re asking about?

With spinal cord injuries, the Schiff-Sherington phenomenon is caused by release of inhibitory influences.

Both of your videos appear to be examples of the Fencing Response, an involuntary reflex typically associated with concussions. Google produces many more videos (if you have the stomach for it).