Why do people bite their nails even when they do not want to?
Nail-biting is considered a parafunctional habit. A parafunctional habit is the habitual exercise of a body part in a way that isn't the way that that part was intended to be used. Other common parafunctional habits include bruxism (grinding of teeth), hair-pulling, and picking at skin.

Nobody knows what causes these habits. Possible physical or psychological causes may include emotions (aggression, anxiety, stress, tension), hyperactivity, complications from other disorders (such as obsessive-compulsive disorder), or as a coping or focus mechanism, similar to how babies and young children find it soothing to suck on their thumbs.