Ever wondered where this phrase comes from?
This is from Aesop’s fable: The Fox and the Grapes. In short, a very hungry fox spots some delicious-looking grapes but they’re too high up the vine for her to reach. Eventually she admits failure, deciding bitterly that they would only have been bitter and unripe anyway.
In general, modern use we tend to extend fox’s reaction to words by saying something mean, following such disappointment.