Can anyone explain this, please?
I'm not sure. There are some possibilities though, and I'm pretty sure one of these is right.
1. They are stacked up by someone as a safeguard against this dude, and if you topple them while he attacks, he will leave. (Not likely, unless he only attacks right at that spot so there's a decent chance of toppling them.)
2. They are stacked up by someone in order to summon him or get him to attack people, so toppling them makes him stop and leave. (Decent chance, except normally you have a target when you want to kill someone, and this seems difficult to target at a specific person.)
3. He stacks them up himself every so often, enabling him to attack, so toppling them makes him stop and leave. (This makes the most sense from a logical standpoint, but it's narratively unsatisfying. So not likely to have been written this way by the author, imo.)
4. Rock stacks are used for guidance. So maybe their presence is what lets him be there in the first place. But they weren't necessarily stacked in order to draw him to them. People just like stacking rocks. (This is decently likely.)
5. In Japan, rock stacks are used to mark a spiritually significant location. Which also could have drawn him. Again, probably not intended to summon him, but could have actually been meant to mark the location as having strong spiritual energy. (Also decently likely.)