Guess what: it looks like the authors didn't control for income (or even just whether the person has a job!) or intelligence.
I just read the paper; there are many diet and exercise-related controls, and that's it as far as I can see. I totally agree with the OP that being the kind of person who might drink coffee probably has a confounding effect on health. I can't even think of how to try to control it properly.
I don't understand how you get from "most studies are inaccurate" to "but you shouldn't assume the ones that get reported on in the media are inaccurate in a way that we can detect". Why not? People who are performing studies that get picked up by popular media are the least likely people to be performing their work rigorously, and the most likely to be choosing a sensational hypothesis that's difficult to measure correctly.
I agree that we might eventually get to a point where the amount of skepticism and cynicism about scientific results vastly outweighs the number of papers published with poor experimental design or lack of real statistical significance. But I don't think we're currently anywhere close!