Vernor Vinge called it Belief Circles. And in Rainbows End he tells a story of how to get them to stampede in one direction or another to suit anyones agenda. But on the flip side, once you create a herd of domesticated animals (side note: always useful to deeply understand how the process of animal domestication works), Stampedes can start from just one individual getting scared by their own shadow. To keep things from going out of control, the herd manager is then programmed (or "learns"), to get the herd to run in circles. They eventually get tired. And the story ends happily ever after.