Except this is an analogy not a true comparison of the systems. The act of growing muscles is due to muscle damage and regrowth (to really handwave), and that action causes soreness. It’s not cumulative damage to the muscles, ideally it should heal in between. The same experience is not true for skin. You’re not “improving the health” of your skin by being tan, and we know that damage to the skin is cumulative.
The health benefits of being in the sun seem to be a combination of mental-health (sun=happy) and chemical-release when skin is exposed to sun (eg vitamin D). This seems more like “certain side affects of sun expose are positive to the overall body, despite the growing damage to the skin”.