The car when hits the tree, the car stops.
According to Newton's first law of motion
This is also known as the law of inertia.
When the car is in motion, the person in the car will also move with the same speed as that of the car.
When brakes are applied or the car hits the tree, it comes to rest.
But due to inertia, the person in the car is still moving forward before stopping.
This results in hitting the head of the person with the parts of the car as the car stopped but the person is in motion.
If the person wears a seat belt, it will stop him/her to lean forward due to the motion.
Thus, avoiding injuries.