>>12291246They adjust for cofounders, but obviously that's never going to be perfect. And I should have said sun exposure, not necessarily sun bathing.
https://doi.org/10.1111/joim.12251There were 2545 deaths amongst the 29 518 women who responded to the initial questionnaire. We found that all?cause mortality was inversely related to sun exposure habits. The mortality rate amongst avoiders of sun exposure was approximately twofold higher compared with the highest sun exposure group, resulting in excess mortality with a population attributable risk of 3%.
10.1007/978-3-030-46227-7_5
Increasing sun exposure is related to lower prevalence of death in cardiovascular disease (CVD), type 2 diabetes, and other noncancer non-CVD. In this chapter we aim to make a short update on the knowledge regarding sun exposure and all-cause mortality. Data support the hypothesis that low sun exposure habits are a major risk factor for all-cause mortality. Low sun exposure is related to an increased risk of death due to CVD and noncancer/non-CVD, and a minor reduction in risk of cancer. Active sun exposure habits have a dual effect; it increases the incidence of skin cancer, but also improves the prognosis in terms of all-cause mortality. In a low solar intensity region, we should carefully assess both risk and benefits of sun exposure in order to obtain balanced recommendations.
There's a couple more I would have posted, but running out of room. The hypothesis is that sunlight generates the release of nitric oxide, which lowers blood pressure and reduces the risk of cardiovascular disease. Heart Disease and CVD are the biggest killer today, so reducing that risk would (presumably) save more people than the increased risk of skin cancer, plus sunlight reduces the mortality rate of cancer.