Scientists say the monkeys' behavior is a crafty adaptation to living near people.