Surgery isn't needed to tune the CNS. This study shows that fMRI feedback allows to modulate the pain perception
. People (chronic pain pain patients and control subjects) were able to learn to voluntarily deactivate the brain region that links pain perception and emotion, thereby reducing their subjecive painful experience.
BTW, although acute pain is indeed a useful signal, the nervous system sometimes goes awry and becomes permanently sensitzed to pain or even sometimes generates pain. In these chronic pain conditions, the pain becomes the disease, and treating it is a good solution.