Humans aren’t the only species that tend to move to a musical beat: Animals that mimic vocally (such as parrots and, here, a sulphur-crested cockatoo) bob their heads and move their feet. Animals that don’t mimic vocally don’t do this. So possibly our urge to move to music is a by-product of our tendency to mimic vocally — it’s a motor response to something we hear.
(Aniruddh D. Patel, et al., “Experimental Evidence for Synchronization to a Musical Beat in a Nonhuman Animal,” Current Biology 19:10 [2009], 827-830; Adena Schachner, et al., “Spontaneous Motor Entrainment to Music in Multiple Vocal Mimicking Species,” Current Biology 19:10 [2009], 831-836.)