I think you handled it fine. At some point when they are older you can explain that even though it's not healthy or smart, it's their right to do it, and they may choose to do it anyway. You can also explain that many times kids never think something bad is going to happen to them, it only happens to other people, and they not really thinking ahead. Another good discussion when they reach middle school age is how sometimes kids still want to try things out because their friends are doing it, but some things can become addictive and hard to quit once you start - so then it's about peer pressure, wanting to fit in, and how things like smoking, alcohol, and drugs can turn into an addiction.
No matter what, kids can be taught just because someone does something like smoke, doesn't make them a bad person. And that it is not nice to point out what they are doing "wrong". Kids at that age often don't have any "filter" and need to be taught sometimes to mind their own business, if it's a random person out in public. And if it's a kid their own age, they can certainly say something, and they can tell an adult if they think they are putting themselves or others in danger, but at the same time, it's not their responsibility to educate others on the dangers of smoking. They can only control themselves.