I think the hypothesis that these "bad foods" cause inflammation is a good one. But there are counter examples where pro-inflammatory foods are known to be long-term healthy. Unfortunately humans are just way too complex to get good clear answers on sweeping generalizations like this.