I saw it on numberphile. Something something cosine of theta. I have no idea, but that sounds like triganometry to me, and pi is all over triganometry.
The pi is coming from that cosine.The cosine of a variable angle alpha drifts between 1 and -1, and the zero point is where alpha equals pi/2. That transition from positive to negative can be seen as the change in direction of the big ball.
I still have no idea how to understand this, but writing that down helped a little.