A friend of mine recently asked why “hangnails” evolved. I explained that they didn’t evolve, they’re just skin damage. Here’s a bit more a formal explanation for anyone interested to pick at.

A hangnail is a small piece of torn skin (not nail) near the edge of a fingernail or toenail, typically caused by: dry skin or dehydration, frequent handwashing or exposure to harsh chemicals, nail-biting or picking at the skin, cold weather, or any combination of those things.
Because our nails evolved for protection and manipulation of objects with fine motor control, the skin around the nails is fairly delicate to allow fine motor control and sensitivity. This makes it fragile, especially at the junctions with our nails. When our skin gets dry or damaged, it can tear easily, creating hangnails.
Hangnails did not evolve, at least not in the sense of being an adaptation or a beneficial trait. They’re simply a byproduct of how our skin and nails grow. Hangnails don’t offer an evolutionary advantage. In fact, they can be harmful, because they can become painfully infected, leading to paronychia. Paronychia is usually due to an acute infection with the common bacterium Staphylococcus aureus, which is usually found on our skin. Gradual, or chronic, occurrence usually results from a microscopic fungal, yeast, infection by Candida albicans.
Bottom line, hangtails did not evolve, they are just a side effect of having complex hands with delicate skin. When that delicate skin is exposed to environmental wear and tear, hangnails are often the collateral damage.
How do you avoid hangnails?
Keep your hands and cuticles moisturised, wear protective gloves when doing the dishwashers or handling abrasive materials or any kind of corrosive chemicals. Avoid alcohol-based hand sanitizers. Eat a healthy balanced diet, get plenty of outdoor exercise, and don’t pick at your fingernails or the surrounding skin!