I think the theory is that you need to distract a certain part of your brain if you want to get on with a task that requires a degree of concentration. Dance/trance works pretty well for this (for most people). After all music is just a way of tricking the brain into enjoying counting.
Once I tried listening to classical music, I found it very difficult to program to. I decided that the music was too complex and actually used the complex-task part of my brain (which I needed for programming). I also had a similar experience when I tried to play a language learning tape in the background while programming.
It's a fun experiment to run on yourself either way.
I find that whatever music I use for working out works best. I guess there's some link in my brain - the meditative state you get into when you exercise where it's just you, the pain and the music puts your brain into a highly focused state. I discovered that after a while of doing this, whenever I listen to my exercise playlist, it puts me into that same focused state regardless of whether I'm exercising... and I now use the same playlist for highly focused/fast pace programming. Of course it helps to maintain the link between that kind of music and focus if you regularly use it for exercise.
Once I tried listening to classical music, I found it very difficult to program to. I decided that the music was too complex and actually used the complex-task part of my brain (which I needed for programming). I also had a similar experience when I tried to play a language learning tape in the background while programming.
It's a fun experiment to run on yourself either way.