I wouldn't wear a helmet for a short relaxed trip to the shops on a nice even seperated path if it wasn't the law. I suspect I am more likely to die from melanoma than brain injury from a fall and a broad brimmed hat would make more sense to me. Rest of the time they are better than nothing but not by much. The fines for not wearing them are insane.
Any good done by mandatory helmets is immediately undone the moment you funnel cyclist into door lanes. Flying into someone's door at speed can give you serious brain injury with or without a bit of foam on your head. Helmets are great for sports cycling but the weakest protection for commuters. They won't protect anyone from being crushed by a turning garbage truck.