Generally great apes are animals that live in community. Indeed, one of the reasons that great apes developed such large brains is as a result of their need in social situations. Great apes (along with lesser monkeys, dolphins, bears and wolves, with a few more) require a large brain to remember things about the many individuals that they socialize with, and how each has behaved, who is nice.
While this comes in use in many other ways – such as helping to remember where to find many different types of food and how to access it, it is thought to usually have been social pressures that usually required the evolution. Chimpanzees often live in large groups of between 30 and 100. Gorillas tend to live in groups of 10 or so, even male gorillas which are required to live their original group usually form bachelor groups which requires similar social skills.
Indeed, Orangutans are different in this way, as they live in a forest which does not supply as much to eat as the the forests in Africa. As a result of this, Orangutans do not live together all the time. Instead they roam large areas alone or mothers with their young. However, living in forests that are this complicated to survive in, requires many clever techniques to access food, as well as complicated methods to access it.
This is where this behaviour comes in. When male orangutans leave their home region, they often do not know where to find food, or how to access it. This Peeking behaviour allows orangutans to access local knowledge without the social structure that is normally deliver this. This is obviously one of many adaptions that Orangutans have had to make to be able to live in the forests of Indonesia.