For most their diet probably wasn't better than a modern diet, just different. If you max out at 40 years, it's difficult to tell if your diet is bad in old age.
Farmers and middle-to-lower class people only 90 years ago (as per my grandmother) in my region where mainly eating potatoes, grain, and meat, veggies and fruit were usually only eaten for sundays, since it was more expensive on the market.
That doesn't sound like the pinnacle of healthy diets.
Even farther back, people ate whatever they found or farmed with very little variety. If you don't get old, you can have some very unhealthy diets without much ill effect. Diets around the world in the pre-industrial era have ranged from 100% meat to 0% meat, with grain fruit and starches also ranging all over the 100%-0% scale.