Two people typing "/dance *" at roughly the same type can sync dance. You can add " *" at the end of any emote to do it at the same time as another person.
Before there was the " *" command, people would just have to be able to type /dance at the right time. That ranger probably learned how to do that back then.