I eat less and less "junk" food as I get older. I might drink soda 5 times per year. I have fast food maybe once a year...I don't think I've had McDonalds, for example, in 4 or 5 years.
Cook more, and if I do eat out, I try to make sure it's healthier like shawarma/Halal instead of burger and fries/pizza, etc.
I was probably 23 before I new how terrible soda really was for you...a shorty I was dating broke it down and was like all that sugar turns to fat dawg wtf you doing? I used to hoop and drink those 99 cent arnold palmers for hydration

so a lot of it just comes with education. Youngins now are far more educated on these subjects.
Also, I've been on the gym life for 2 straight years so I don't want to waste my workouts by eating/drinking trash.