Researchers at the University of Singapore have identified neurological mechanisms that cause the brain to synchronize with external rhythms. What’s more, this syncopation can have a direct effect on cognitive performance:
…the University of Singapore first tested subjects by flashing a series of images on a video monitor and asked them to quickly identify when an image was flipped upside down. While participants focused on this task, a synthetic drumbeat gently tapped out a simple four-beat rhythm in the background, syncopated by skipping the fourth beat of each measure.
The results showed that when the image was flashed on that missed beat, the subjects identified the inverted image much faster than when the image was flashed at times out of synch with the beat or when the images were presented in silence. Somehow, the brain’s decision making was accelerated by the external auditory rhythm and heightened at precise points in synchrony with the beat. Since the power of rhythm in boosting cognitive performance was evident on the missing beat when no sound was presented, the effect could not have had anything to do with the sound of the drumbeat acting as a stimulus. Mental processing must have fallen into a rhythm of heightened expectation and superior performance on the anticipated beat.
Studies like these shed some light on the trance-like power of drumming when used in a ritualistic setting.

