That's always the same story. A group of researchers finds a funny correlation in the data. They don't know the cause of the correlation, but they just write an article explaining that. Of course, the article if full of conditionals and sentences like: "this should be investigates further". Then, a journalist finds this paper, eliminates all the conditionals and writes a click-bait article, so his employer can earn m…
What can be done to fix this problem?
Mendelian randomization, sometimes.
You need a genetic variant that is pretty well studied and doesn't have too many effects, just a small handful that are well characterized.
A well characterized variant is in ALDH2. [1] People with normal ALDH2 metabolize alcohol normally. Those with variant ALDH2 process acetaldehyde poorly, so this unpleasant metabolite remains in their blood longer, causing discomfort and flush. Those with 0 variant alleles drink more than those with 1 allele; those with both mutations in alleles drink the least.
Let's say you had some variant like that, but for spicy food metabolism. The more variants in this spicy food metabolism gene, the more spicy the food felt to you so you might eat less.
If those who would be genetically expected to tolerate more spicy food survived longer than you would otherwise expect in a (genetic) dose-dependent fashion, then this would be suggestive that spicy food intake might be in the causal pathway of longevity. You would have to do additional work to be sure that the gene didn't do other things in metabolism (pleiotropy) that directly had effects on longevity.