I never get spanked, but I would try to compare this sense of touch to the sense of hearing.
Like
@Terri already mentioned, sometimes we need exactly this maximum, and there is also how our brain works.
Our brain associates emotions with experiences. These are some of the strongest memories. It's similar when you hear a song that gives you that beautiful feeling of old times. When the song is over, you often hear it over and over again.
It will probably be similar with spanking. If you have experienced such great moments, your brain may have stored the emotions of the pain and the pain in turn recalls those memories.
That’s why it feels so “bad” when the song or spanking ends. The exhilaration you experience in this moment passes.
This knowledge only happens based on my own experiences and not science. If this is not completely biologically correct, please forgive me.