There are a few reasons why spinning is a good way to do pain control. There are some good things, other than popping pills, and spinning combines several of them.
The obvious is, distraction. The shrink who taught me pain control techniques (awesome, lovely guy; you need a shrink in Honolulu, let me know, I'll get you his info) had a fancy term for it. But what it comes down to is not sitting there thinking "ow, this hurts". My doc spent an appointment picking my brain, going over all the things I do for fun, any activity I enjoy, from reading to surfing the 'net, to talking on the phone, to knitting. When we were done, he grinned, told me next time I was in pain to pick one, and handed me the list.
I'm not sure this truly works at all on the pain, but it certainly improves your quality of life; short of murder, ANYTHING is better laying in bed feeling awful.
Movement is another goodie. In any type of long-term pain lasting more than a few minutes, your body will build up chemicals in your tissues that will either cause more pain or at the least just make you feel crappy. Any kind of movement will get the blood moving and help flush that stuff through your system and (assuming you have normal kidney and liver function) thereby feel better. When I REALLY want to get things moving, I walk up and down the stairs a couple times. Physical therapists usually advocate going for a walk. But even the smaller, less extreme motions of spinning will work the muscles, move the blood, and help at least a little.
The last trick seems just like that - a trick. You're playing a trick on your own brain. Like a computer, your brain has a list of priorities. And paying attention to chronic pain is pretty low on the list, all things considered. (This is kind of how the distraction method works, too.) A much higher priority is keeping track of where your body is in space, for safety. Your brain wants to keep you from walking into walls and bonking your head. This means the brain hack the physical therapists call "oscillation". Pick a part of your body - foot, leg, hand, and calmly move it back and forth, just an inch or so in either direction. Your brain goes "Ooo, wait, where's that hand going?" and pays attention to that.
It works amazingly, freakishly well on chronic pain.
And guess what you do when spinning? Wiggle your foot or feet up and down. And coordinate it with your hands. Then your brain says "OO! Wait! and pays attention to that.
Of course, you also wind up with yarn at the end. And yarn makes everything better.