its possible there is some kind of loose cognitive aspect to whats going on (need to read more about the waving part) but it seems a little goofy to infer a belief system as human beings understand it. My guess would be they think moons are animals themselves and think waving the branch scares the bad moon away so the good moon can come and raise the tide.
waving an animal off so another animal that benefits you can take its place sounds like ritual spiritualism to you?
This is describing Animism, the dominant religious practice for most historical cultures.
Believing the moon is a living thing you can influence with your actions does
When the two animals are both just the moon yeah it does. Edit:removed sun and moon