It's been studied scientifically, so there are a few reliable things we can say about onychopagia. Unfortunately, "why" isn't one of them.
Every time you sit down to dinner for four, consider that one of you probably had a fingernail hors d'oeuvre sometime that day. Though actually, science says most nail-biters don't swallow, they spit when they're doing whatever they do with that torn-off nail. In other words, one out of four adults, regardless of sex, national origin, IQ, or mental stability, is a nail-biter. And better yet, one out of three nail-biters has the inclination (and the agility!) to bite his or her toenails.
Nail-biting usually beings between the ages of five and six, though peak nail-biting years are — no surprise — adolescence. Studies suggest a predisposition to nail-biting is inherited. And some investigators believe the habit's a way to discharge tension, anxiety, or anger, but nobody's actually proved it. Part of the problem of finding out "why" is the likelihood that nail-biting begins as a response to some early stimulus but persists into adulthood purely as a long-term habit, years after the stimulus is gone. So nail-biters can't say why they do it, they just do it.