Related: there was also a strong correlation between receiving some vaccinations and not developing dementia during the next five years. This included vaccinations against diseases that people normally do not get. This hints at a reason other than simply „avoided disease“.
Edit: I found the submission. Actually it was a study on influenza vaccination that included a comment about other vaccines: https://news.ycombinator.com/item?id=31899781
I wrote a summary in this comment: https://news.ycombinator.com/item?id=31900161