And there are countries where everyone rides a bike, and they are not usually the ones with mandatory helmets. When you hit someone with a bike you are less likely to kill them than when you hit them with a car, so more bike riding means less deaths, without even considering the effects of air pollution.
Helmets are fine for sport riding, but inconvenient if you want to ride 5 minutes to the shops on a whim. And that kind of riding is usually less intense and safer, I presume, anyway. Football has helmets, walking doesn't.
Those countries also have a higher number of brain injury cases vs countries where people wear helmets.
If you are hit by a car a helmet will do approximately nothing. However there are a lot of accidents that happen where you are not hit by a car where a helmet will help. (and even more when knee and elbow pads are what you need)