There's a very strong relationship between music and math as skills, for some reason. It's been commented on and studied in quite a few places.
I have no idea why the relationship is so strong, but it is!
I have no idea why the relationship is so strong, but it is!
Good pattern recognition skills (as in the general meaning of the word 'patterns', not necessarily design patterns), may be part of the reason, since patterns occur in both code and math.