What do you think about the Sugar Tax that gets brought up and passed in a number of cities?
I personally can't figure out why any government would want to tax things with sugar, when a food tax would generally do the trick on bringing in money from purchases made on food and snacks in general.
They make these taxes to discourage people from buying those products. For example, Berkeley, California saw a drop in soda consumption when they implemented their soda tax. I think this is a good idea, personally. If people aren't willing to stop buying things in consideration for their health, maybe they will for their wallet.
This isn't done so much out of concern of peoples' well-being (although I'm sure that plays a part), it's more to reduce costs associated with healthcare. In the United States, a 2018 study found that an average of 8.2% of Medicaid dollars go to treating obesity -- some states spend more than 20%. That money could be better spent, imo, so it's good to reduce this where possible since obesity if often preventable.
If people choose to consume the products, increasing the price won't stop them from buying it. It certainly hasn't stopped people from smoking or consuming alcohol.