Biting, like extensive picking your nose and other self-harm behavior are probably caused because the minor pain causes the body to produce endorphines, substances similar to morphine. Another related explanation is that it is a way of avoiding thinking of issues causing anxiety. Because it causes pleasure, such habits are difficult to get rid of, similarly to getting rid of drug abuse.
Read about self-harm.
Read about nose picking.
Read about hair pulling.