Full Idea
The objective badness of pain is not some mysterious further property that all pains have, but just the fact that there is reason for anyone capable of viewing the world objectively to want it to stop.
Gist of Idea
Pain doesn't have a further property of badness; it gives a reason for its avoidance
Source
Thomas Nagel (The View from Nowhere [1986], VIII.2)
Book Reference
Nagel,Thomas: 'The View from Nowhere' [OUP 1989], p.144
A Reaction
Presumably all pains (e.g. of grief and of toothache) have something in common, to qualify as pains. It must be more than being disliked, because we can dislike a food.