At one time or another, both science and popular thinking supported beliefs that eating foods like coffee, eggs, milk/butter/cheese/saturated fats, white bread, salt/sugar/fructose, tuna, charred and preserved meats... all are bad for you.
Science is often misused and erroneous findings are commonplace. Still, popular 'knowledge' is hardly free of bias and ignorance. Sometimes, a little common sense is about as close as we get to making intelligent choices and this gives a lot of credence to the old saw... everything in moderation.
When it comes to moderation, for food it's looking at not overdoing it. But, when it comes to exercise its getting at least a minimum amount of it-- e.g., at least 30 minutes of vigorous exercise at least 5-days /wk.
Probably the best advice is don't eat or drink too much or you'll get fat and for what is eaten, all things in moderation is key -- counting on the benefits to balance-out the negatives -- so long as you're getting the minimum amount of exercise.
All said, however, heart disease is still the leading cause of death (one-in-four). Not smoking , eating well but not eating too much and some exercise on a regular basis will help to prevent heart disease and so too may well be the consumption of alcohol.