tl;dr: exposure to sunlight without sunscreen has benefits for cardiovascular health - and the kinds of cancer you get from direct exposure to sunlight on a regular basis (basal cell and squamous cell carcinomas) are almost never fatal. The benefits to CV health significantly outweigh the increased risk of these carcinomas.
Melanomas only account for 1-3% of skin cancers and are less likely in outdoor workers and tanned people than they are in indoor workers.
> “The risk factor for melanoma appears to be intermittent sunshine and sunburn, especially when you’re young,” says Weller. “But there’s evidence that long-term sun exposure associates with less melanoma.”
Makes sense, humans probably wouldn't have made it this far without going outside.
[1] https://www.outsideonline.com/health/wellness/sunscreen-sun-...