Yet coffee consumption is correlated with longer life. Probably the Quercetin and Trigonelline in coffee offsets the supposed damage.
It also correlates with serial killers, because turns out no one likes to do their hobby in poor weather.
As an example for coffee consumption it could just be that coffee is consumed more in countries with higher living standards and higher living standards lead to longer life. Coffee might not necessarily be healthy by itself, though of course it could very well be.
People who don't have access to Healthcare don't have the luxury of things like coffee, I bet that shows in the data.