They're not all (or even mostly) flawed in this particular way, but a lot of studies do have flaws. And even the best-designed studies have problems. Nutrition studies are very expensive to run, so to save costs they usually have small cohorts (number of people), which means that the results aren't as reliable. Also, they usually have to rely on people to self-report what they're eating, and people's memories aren't that reliable. But even if the study is extremely well-designed and the scientists draw appropriate conclusions, news outlets tend to exaggerate the findings.