The Bali government has been constantly reminding travellers to take precautions when interacting with primates. First of all, you should not get close to them, as they understand perfectly well that for the sake of a stolen item a person will offer them some kind of treat.