When the bamboo tips forwards due to the weight of the water, it bangs against the pebbles / stones and then again when it tips backwards. This noise and motion is designed to scare away troublesome wildlife, such as deer eating a farmer's crops or a hungry heron bird on the side of a koi pond.
Relevant image keywords:
bamboo, bamboo canes, bamboo deer scarer, deer, deer scarer, garden, garden water feature, japanese, japanese garden, japanese tea garden, motion, nature, no people, outdoors, pebbles, scarer, spout, stones, sunny, tea garden, tipping, water, water feature