Why do you smoke even though you know it’s one of the most unhealthy habits?

I started to smoke joints because being high is fun. Then I kept smoking cigarettes because I like the taste and how it goes with coffee. And now that I’m, at least a little, addicted to it, it gets hard to not smoke sometimes, when I’m stressed or when I drink a coffee. the crave is not rational so I sometimes just want to smoke even though I know it’s bad for me. Most of the time, I manage to not smoke, sometimes the crave wins.