Seat headrests and side impact air bags provide this function much more effectively than loose helmets. Which are not safe for use in passenger cars due to neck trauma. Further, your skull hitting the pavement is more rapid acceleration than a survivable car crash.
That said, NASCAR drivers do use helmets and a five point harness instead of air bags. But, very importantly they strap the helmet to the head rest, but that only works because of the five point harness and several other safety systems missing from consumer cars. https://en.wikipedia.org/wiki/HANS_device
TLDR: The issue is neck trauma. Which NASCAR avoids, by strapping both the driver and their helmet down.
Even so, it does seem like we could save a decent number of lives by using helmets and HANS devices while motoring.
Well, other than it being tremendously inconvenient and messing up people's hair. We have active prioritized those two things over safety.