When listening to music, I often see people tap their feet either to the main beat or the dominating rhythm of the music.
Why do people do this?
People tap their feet due to increased activity in the cerebellum.
There already is some evidence that music can release certain neurotransmitters, including dopamine. You can assume that people who tap their feet to the music, are in someway "pleased" by the music, meaning that their body goes into some sort of physiological joyride. Part of this joyride is an increased blood flow to the limbs, an increase in heart rate, dilated pupils, and most significantly a rise in activity of the cerebellum.
There is also the theory that music can have similar effects as drugs & addiction on the reward pathway of the brain. This pathway stimulates the flow of dopamine to the striatum, which is a part of the forebrain, activated by reward, motivation and addiction. In addition those dopamine levels can already peak milliseconds before something "special" in the song starts (e.g the bass drop, guitar solo, etc.), which strengthens the theory that our brain anticipates and predicts upcoming events (such as the memory prediction framework).
However, for example to songs the individual is completely unfamiliar with, the memory prediction framework may not be activated, therefore dopamine levels will not spike before the actual e.g. "drop", but after it happens, the striatum will be filled with dopamine. Furthermore, as mentioned in the beginning of the answer, the cerebellum gets more active as certain music is played, releasing neurotransmitters, and therefore the increased activity an individual is more likely to move their e.g. legs, because of a heightened motor-system.
The short answer is that it is pleasurable.
Recent research from Witek et al (2014) sheds light on this. Their research on affective response and desire to move when listening to funk drum breaks showed that "syncopation seems to be an important structural factor in embodied and affective responses to groove". Here is their full PLOS article: http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0094446)
This research rests on a longer history of research on the relationship to sound and motion. A nice framework that synthesizes this research was developed by Godøy et al. (2016) - http://www.tandfonline.com/doi/full/10.1080/09298215.2016.1184689