Music theory is basically math. Good knowledge of music theory is very very helpful when playing the piano, where you can do so many things at once. The ability to grasp many harmonies, phrases and rhythms simultaneously (both when reading sheet music and when performing) requires thinking very fast. See any connection yet? ;-) I've encountered that nearly everyone at my school who are very good at music theory are also pianists or play the piano very well. It is so of course because of the fact that the piano demands a greater theoretical and analytic knowledge/perspective than almost any other instrument (the organ is quite complex as well, but I would say the guitar is the next worst after the piano as the guitar needs in my mind a greater technical skill. The organ's keyboard is, after all, anti-dynamic.) And yes, I know that music is much more than theory and analysis, but this thread was about the connection between math and piano playing, and the piano's theoretical and polyphonic demands/possibilities are more easily conquered if you have an analytic/mathematical way of thinking.
I'll give you a math/music example: I've always been interested in mathematics, and that's what I was studying in high school. I was planning on an engineer's education, but decided at the last moment to go for the music career instead. So after high school I attended a music class at a "folk college" (a kind of preparatory school for college) and didn't know anything at all about music theory. Didn't know what a chord was, how to notate a G in the treble clef...a clef? What's that? Well, you get the point. Anyways, six months later I wrote the music college theory tests where I had to harmonize a melody, analyze a semi-tricky four-part choral with function analysis (?, T-Sp-DD7 etc.) as well as compose a melody for a lyric, a polyphonic second voice for another melody and a four-part chorale for a given melody. The only time I had access to a piano was for the melody-harmonizing part. I scored the highest points of all test writers. This would never have been possible if I didn't have the math-oriented brain and way of seeing things, which enable to see patterns and learn rules and theorems etc. very fast.
(Of course I wrote some of it by ear, in my head, that is; but putting what you hear in your head on paper also requires theoretical knowledge.)