Being around tobacco smoke is bad for you, even if it's someone else's smoke.
When someone smokes a cigarette, most of the smoke doesn't go into their lungs. It goes into the air, where anyone nearby can breathe it.
Smoking is banned in many public places. But many people are still exposed to secondhand smoke, especially children who live with parents who smoke. Even people who try to be careful about where they light up may not protect those around them.