Coffee causing dementia is a pretty shocking claim that I haven't heard previously. Do you have more reading on this?
All of this means that coffee drinkers are going to self select for various other features that add confounding factors. Imagine you were doing a study on marriage patterns: I wouldn't be surprised if "Drinks their coffee in the cafe itself" was more highly associated with being single. And the headline will read "Dedicated coffee drinkers less likely to find a partner"
(1): https://hammer.purdue.edu/articles/thesis/Identification_of_... (2): https://onlinelibrary.wiley.com/doi/pdf/10.1002/ijc.20703 (3): https://www.sciencedirect.com/science/article/pii/S157002320... (4): https://academic.oup.com/toxsci/article-abstract/173/1/171/5...