Smoking while breastfeeding can expose the baby to harmful chemicals through breast milk, affecting their health.