I think there’s just a decent component of “random chance” involved. You can live a healthy life and still die too young, or you can be a lifelong smoker who lives to 90.
When thinking about the impact of behaviour on health, it talks about humans in aggregate, not on an individual level.