On the other hand, if you are getting a helmet because you have to but don't really want to, your selection criteria will be different. You are less likely to invest in quality equipment.
The problem with dodgy headgear is that a badly fitting helmet will not feel right, or align well with your head movements. This in turn means such a helmet is a source of low-grade irritation and distraction - and due to bad fit, may actually limit your field of vision when you turn your head around. The latter clearly increases the wearer's risk.
Hence, a cyclist who wears a helmet only because it's mandatory is (sadly enough) more likely to get into dangerous accidents. They are unable to give their surroundings their full attention, and may also be suffering from ill effects of their chosen gear.
Net effect? More dangerous situations, with smaller safety margins between the cyclist and their surroundings.
Full disclosure: I prefer to wear a good, lightweight helmet that fits snugly and doesn't accidentally impair my vision. I have also experienced badly fitting helmets and consider them hazardous. This is the reason why I am against mandatory cycling helmets - regulation can not guarantee ergonomics, so with mandatory helmets the truth is that more people will be in the traffic with headgear that will make them less safe to themselves, as well as everyone around them.