I still think the foundation is that mindfulness helps you relax which then reduces the pain, but I think it goes further than that. When we use distraction to deal with pain, it is still there, and we are ignoring it. It is like a little child pulling on your arm, calling, "Mommy! Mommy!" while you carry on a conversation with someone else. What happens in that scenario? Usually the calling gets louder and more insistent, but even if it doesn't, it tends to feel like it does the longer that we ignore the child.
I think that when we ignore a pain, it keeps bothering us and creates an ever increasing foundation of stress. A circle is formed as we work harder to distract ourselves away from it, and it screams louder as tension and stress keep us from doing the very actions necessary to reduce the pain. We get more and more out of touch with our bodies, and become more and more the aggravated by stress and neverending pain.
Insert mindfulness into the equation. We recognize that we don't feel quite right. We start paying attention to our bodies and realize that something hurts. We pay close attention to the part that hurts helping everything there to relax and letting go of the pain as best as we can. Because we are aware of the pain, we can modify our activities to not worsen it or to provide relief. We can listen when it calls to us and give it appropriate attention at that moment so that we can also be mindful of our environments and those we are interacting with when the time is right.
This could also be a metaphor for the benefits of appropriately paying attention to our children, but that is perhaps another post.