On one hand, yes, it does make sense that increasing the prices of cigarettes, for example, decreases the number of people who smoke. That’s a nice result.
On the other hand, the sin taxes hit poor people the hardest. First, the incremental increase is a larger percentage of a poor person’s budget. Second, humans do not have a linear response to price changes — to achieve the desired cessation rate, you might have to massively increase prices, which exacerbates the first point. Third, one could argue that rich people can afford a multitude of stress relievers and therapy methods. Poor people cannot afford that, so the sin tax is a draconian method.
Does it have the problems you are listing? Yes, absolutely. However, they already have problems that they will just have to pay for later in some of these. This is forcing some of those extra costs to be factored into the decision in the first place.
For me, I see it less about limiting peoples freedoms, and more about moving delayed costs up front. People are still free to buy/sell most any food product. However, some appear to have a marked impact on society, but in a delayed fashion.
That is, you won't get sick from drinking 32 ounce sodas the day you drink them. However, you are likely to get addicted to them and they will make you unhealthy eventually. Increasing the costs moves some of that pain early, so that it is easier to make the choice to avoid.
Do I think this is perfect? No. Not even close. Nor do I think people should be disallowed from buying stuff like this. I do think more of the proceeds should go to making people healthy or at least educated. Going into the producers of these products doesn't help the health, and the way marketing works, they become less educated on the risks of these products. There is a reason we had to regulate the hell out of cigarettes, for example. And I don't shed any tears over that.