More than likely the "free" classes are only free to the participants. If they are held in a room, someone is getting paid for the room. If the teacher is getting paid, someone is paying the teacher. If they're given by volunteers on unmaintained public land, they might be free, except it's probably going to cost some gas and vehicle wear-and-tear for everyone to get to the unmaintained land, etc. etc.I'm clarify, the OP was centered around taxing cigarettes - the user pays more to continue their behavior. The "re-distribution of taxes" is referring to the taxes collected from one group that will benefit (influence behavior) another group.
In the second example - an incentive is given to a group to participate. This would be comparable to not taxing the cigarettes - but provide free stop smoking classes in the first example.