I find it hard to believe it's entirely due to motivation, since the body is genuinely tired and complaining, rather than simply mental fatigue. Of course, it's hardly news that listening to music (or singing along) gives your energy a boost - the slaves in N.America certainly knew it, and even the galley slaves of 2000+ years ago knew it. There's a reason all military regiments have a "marching band" too. But has anybody actually got a genuine biological/medical reason for it? I'm sure somebody must have investigated it over the years.
So here's a thought for the day ... why don't you often see long-distance runners (marathons etc) listening to MP3 players? Or is that just my imagination?