Exactly. The entire society had to shoulder the weight of the consequences of bad habits of some.
Were the costs not socialized, there'd be a bit less of a point to tax cigarettes so much: you want to get lung cancer and you are ready to pay for it, go ahead and smoke three packs a day! But this is not how it works today.
Every major category of goods/services has an effect on a large fraction of society. It doesn't follow that we should socialize the expense of every good/service that fits this criteria. It's absolutely not established that doing so, as a rule, does more good than harm, and we have plenty of empirical evidence that more free-market-based societies are more effective at developing themselves than more socialized ones.