We do put restrictions on drinking and smoking, such as limiting consumption to certain times, places and age groups, and many places have things like taxes on soda and other such tactics to reduce obesity. We have even heavier restrictions on other activities that don't pose much threat to anyone but the person doing it, such as hard drugs. We don't want to stop people from having fun, we're all willing to bear some cost for our fellow man, but minor inconveniences which lead to big cost savings make sense. Helmets are incredibly beneficial and the burden is pretty light - even when not required by law most people voluntarily wear helmets. Mandatory helmet laws allow cyclists to keep doing what they love while dramatically reducing the number of severe injuries that society at large needs to deal with, it's a happy medium.