It's quite bad that spain has brought in a helmet law but you have got to remember that in many respects they are still fairly third world country compared to say britain.
There are actually 3 types of Policia, Guardia Civil, Policia National and Policia Local.
And you're right Spain is still in many ways a 3rd world country, although the Spanish would never accept that, and that's half the problem. You have to bare in mind that they have only had a democracy for the past 35 years, and are still a bunch of amateurs in political and legislative matters.
They do tend to bring in laws that have really not been thought through properly, and subsequently end up keep changing them.
Unfortunately 'extreme heat' in this country tends to mean over 40c, as temperatures in the 30's are quite normal in the summer.
One of the other exception for helmet wearing is, the law states that helmets must be worn on 'interurban routes'. This means the roads between towns and villages, in the urban areas there appears to be no compulsion to wear a helmet.
I must confess that I ALWAYS wear a helmet on my bike, like I always wear one on my motor scooter and always wear my seat belt in the car.
But then I have now become acclimatised to the heat.