Ex classical musician checking in. One other possibility that has been hinted at indirectly: many good musicians are rather introverted (singers being the notable exception). You have to be -- or at least not be overly extroverted -- in order to lock yourself in a practice room for many hours a day. It's often lonely. This thus makes musicians temperamentally suited to be programmers.
I used to play the violin for my high school orchestra. I wasn't great, and I often wondered how professionals could practice for hours on end. Now I realize that it may very well be asked how I could sit in front of a computer programming for hours on end.
It's just a matter of finding something you love to do and it won't feel like a chore.
In college, I was in a 1 credit small jazz combo that met every Friday from 3-4. After the instructor left at 4, we'd whip out songs we wrote and would start jamming. Often it was 7 before I looked at the time.
I read an interview with a famous Chen Tai Chi stylist a few years ago. He recalled practicing 12 hours daily for a few years in his youth. He didn't talk about it like work, he just got a thrill out of every moment.