When examining the full spectrum of DaVinci’s drawings, it is common for people to remark on the high number of “grotesqueries”, portraits of hideously ugly individuals rendered that way by mutation, age, or injury. The ugliness contrasts startlingly with the beauty of his other work.
There have been various interpretations of DaVinci’s predilection for portrayals of the grotesque in his drawings, ranging from racism and elitism to mental illness, but I think the key to understanding this phenomenon is how he only ever sketched such ugliness. It does not appear in his professional work.
DaVinci’s drawings and cartoons include both the grotesque and the sublimely beautiful (though of course the grotesqueries are more widely known), but DaVinci understood that in real life, both sublime human beauty and exceptional ugliness are exceedingly rare. Understanding the extremes helps with understanding the typical.
Unlike the world of cartoons, in real life even the most beautiful face is marred by some slight imperfection; and in real life a man with a hideously deformed face may have a twinkle in his eye.
I think it is likely that in his drawings, DaVinci was trying to learn and commit to memory both extremes of human beauty of ugliness so that when he sat down and painted his professional work, he could incorporate elements from both. He was trying to “expand his palette” and achieve greater realism.