I think that sometimes people like to tell themselves that illness is self-inflicted as it gives them a feeling of control over their own lives- 'it can't happen to me as I live on lentils and walk 100 miles a day' (or at least 'if it does happen to me I am blameless, unlike that lot over there'). Also, there is a personality type that enjoys looking down on others.
Of course there are things we can all do to stay healthier, such as eat well, don't smoke/drink/take recreational drugs, and we can refrain from extreme sport, childbirth, occupations that involve danger, driving, and avoiding travel other than on foot and off-road and so on. Unfortunately, one choice sometimes contradicts another, so that avoiding (eg) rugby can protect from head injuries or spinal damage, but lead to obesity, or diverting emergency service personnel into desk jobs could save on treating their occupational injuries but lead to more in the people they would have saved. How do we balance the risks of sedentary occupations against those of heavy manual work?
Tax from sugar, alcohol and tobacco funds a lot of research and other benefits, but drinking, smoking and eating disorders cost the NHS money and can lead to early death. As we know, people can smoke and drink for decades and live to a ripe old age in good health, but equally, non-smoking teetotallers some can get lung or liver disease. We know what increases the risk of various diseases, but they can contradict one another (ie reduce the likelihood of one thing, but increase the chances of getting something else), and in any case, isn't people dying young a good thing if we are suggesting that we live too long to get a pension when we are young enough to enjoy it?
Statistically, it is poorer people who are more likely to be fat, to smoke and to drink too much (thus paying a lot of tax on their lifestyle choices), They are more likely to have started paying in at a younger age if they left school in their teens, and are also more likely to have to work longer at more physically demanding jobs than the better off. I don't know the figures for gym membership, but some of them are expensive, so I'd guess that again, they are disproportionately taken up by the better off, who retire earlier anyway.
Again, I'm not sure what any of this has to do with pensions, which should, IMO be a straightforward financial quid pro quo, but as we have strayed into the territory of health, isn't it better to have a system where we all pay in and we all get treated when we need it, without judgement about whether we were 'responsible' for our condition? I think it was someone's son saying that as a medic he judged that most of his patients were guilty of causing their own illnesses that moved the discussion to a point where (I assume) largely non-experts are sitting in judgement too. It's much more complex than that, even if it had anything to do with state pensions, which it doesn't - unlike with occupational pensions you can't claim them on the grounds of ill-health.