There are a number reasons for this, one of the main problems is a logical fallacy called an "ecological fallacy," where population averages do not necessarily apply to the individual. For example, an average head injury rate across a population could go up after a helmet law but that doesn't necessarily mean a helmet is not a good idea for an individual. There could be a number of confounding factors that result in this population level of effect, for example lower ridership due to enforced helmet laws could result in fewer cyclist on the road and therefore cyclists in general being less visible, which in turn results in drivers not watching for cyclists leading to more accidents and head injuries. In this situation it is still in individual cyclist's best interest to wear helmet.
People seem to confusion whether a policy has a beneficial effect at a population level as evidence whether or not there is a benefit at the individual level. These are very different concepts which can have very different results.
These types of questions (epidemiology) can be quite difficult to study because we must rely on observational studies. Here we rely on "nature" to assign the treatment of interest, which can result in problems such as lurking variables and confounded factors. Gold standards such as controlled experiment are not possible, as it is not possible to select subjects to crash their bikes in ways prescribed by the experimenter - for some reason these studies never seem to make it past the ethics committee. As such, we need to be careful giving too much credence to any one we need to look at the weight of evidence (e.g., meta-studies).
Some of the best evidence for individual benefits comes from case-control studies.
Finally, if you interested in some of the physics of why a helmet can help in a fall see: Would a military helmet make a safe alternative to a bicycle helmet?