That was an interesting phenomenon, for sure. For more, see the Wikipedia article
https://en.wikipedia.org/wiki/Dancing_plague_of_1518
Some people speculate it was caused by food poisoning involving ingestion of psycho-toxic substances. Others speculate it was sheer social mania. We certainly know from more recent history that social manias are possible. Examples as diverse as Hula Hoops, Raves, religious extacies, and even wars come to mind.