I believe prolonged bouts of pain is used to build stamina, as in boot camps.
Dieting fads which are in some instances attempts at quick fixes where dieter doesn't push through probably rebounds with weight gain.
Taken voluntary, fasting can be an unpleasant feeling.
If forced due to circumstances, fasting is also unpleasant, there doesn't seem to be away around it, but pain is part of life, some experience this more than others.
It's possible pain builds character - but not sure 100%, debatable, might have something to do with frame of mind, either get better or get bitter.