Why would villagers attack Orangutans?
In It’s Not Just Conflict That Motivates Killing of Orangutans by Davis et al. (2013), the authors identify number of conflict and non-conflict reasons reported in the study why orangutans were killed in a certain part of Indonesia:

Conflict reasons:


pest
fear/self-defence
paid or forced to kill
orangutans interrupted logging or forestry operations


Non-conflict reasons:


traditional medicine
food
to sell or keep young as pets
hobby/sport hunting
for other trade of animals or meat
killed accidentally or opportunistically while hunting other animals


The results from this survey are depicted in this graph:



Obviously in this case they were not attacked for food. The impression I got from the article makes me think it was probably motivated by people viewing them as pests or as a threat/danger. It is almost certainly more of a social reason than a biological reason. However, in the absence of specific evidence, it is probably not helpful to speculate why this occurred.