Throwing rocks and branches is part of how these animals communicate, and being a good communicator can be an advantage in their society. In zoo environments, especially if groups of people are staring at them, the chimps may get riled up or frustrated, and they may decide to convey that emotion to their captive audience.
"Since they're usually deprived of rocks, or branches, or any small objects like that, for this exact reason, they opt for the next best thing that they have within reach, which is usually poop," Steinitz told Live Science. This explains why you might need to take cover next time you're at the ape house.
However, there is a silver lining: If you're not bothering the chimpanzees, you should be flattered that these primates consider you worthy of their poop-throwing attention.
"Think of it as another intelligent being trying to communicate with you," Steinitz said.