More vit D from more sun could be a side effect of better health. Sort of like if you found that using TikTok a lot was strongly correlated to very low covid-19 mortality; it would just be a marker for youth. This study makes it look much more likely that it's an actual effective intervention.