When your skin is thicker it is less vulnerable to getting skin cancer (this is what a US Navy expert on skin cancer told me). Your skin gets thickest when it has a dark tan that has built up slowly. (Personally I think skin like this looks like leather and wouldn't want it, myself).
People in the past built up their sun exposure slowly over the whole year, working outdoors from early spring to late-autumn. They didn't get a sudden fast-track to colour using sunbeds or jetting off on holiday in April, and they rarely got sunburnt. They got a steady dose everyday instead of suddenly spending all day on the beach after 6-8 hours at school/work every day before. Even a redhead can get a tan with slow enough build up to sun exposure.
Yes sun cancer was underdiagnosed in past, and people used to die earlier from other causes, but if you got to age 8 you usually lived to 60 or 70 (barring death in labour, estimates for ancient Rome , last 165 years of US data ). Our modern indoor lifestyles means that we tend to have sudden and fast rather than slow build up to high sun exposure, which makes a lot of difference.
Also in past as today people got 80-90% of their life-time sun exposure in childhood; kids were outside playing (or working) most of the time, were as rubbish about wearing hats as they are today, and weren't expected to cover themselves up that much (perceived as asexual) -- too hard (for most families) to keep their clothes in good nick, anyway. But those kids also used to have a slow build up each year to sun exposure; nowadays they are in school most of the time.
Undoubtedly sunlight ages your skin, though, so a tan is probably always "bad" in that respect.