What is the evolutionary purpose of white spots in nails and how can they be characterised due to Leukonychia?
This is a common misunderstanding from newcomers in evolutionary biology. Not every trait is the result of an adaptation. Evolution is way more than just natural selection and is not as deterministic as you may think. There is stochasticity inherent to mutational processes and there is stochasticity in reproductive success (called genetic drift). This seemingly totally unrelated post may help you getting a quick grasp of what are the stochastic processes in evolution.

The white spots you observe very likely do not result from an adaptive process but it just happen to be the way it is. For the physiology part (but this would be the subject of another question) I have no idea what drives these white spots.