They bite for fun as part of their game playing behavior. Some of the poicephalus species, red bellies and myers for instance, are recreational biters. Caiques are often the same. Recreational biters usually bite playfully someone they like and more seriously someone they feel they can dominate. They even treat domination biting as fun, often chasing and biting someone as part of a game.
Some parrots bite as a result of emotional 'overload'.
Here are some behavioral dos and don'ts for birds that have shown a tendency to bite. Don't give them access to your face, via shoulder, chest or arm. If the bird is on your finger and lunges, make sure you hold it at chest level and far enough away from your face that it cannot reach you. Only the most trusted birds should be allowed near the face, and even then, should be watched for seasonal or territorial mood changes that might make them bite. For instance, I trust Jing, however one day she saw her own reflection in a hand mirror I was using to see the back of my hair.