Music and programming have a couple of things in common. The most important thing being: the act of creating something. Anyone who's a creator at heart will be interested by many endeavours that allow you to create. For example, I wouldn't be surprised if there's also a disproportionate amount of woodworkers among software engineers (as opposed to among laywers, for example).
The thing is, not every programmer is a programmer because he/she wants to create. There are other aspects to programming that might be interesting to some.