The answer is: drive-reduction theory
According to drive-reduction theory, the drive/motivation that we have to do a certain behavior can be either increased or reduced based on the intensity of our psychological/physiological needs.
Of course, every people have the drive to obtain the best foods that suit our taste and nutritional requirement. But for the victims of famine, the intensity of their physiological needs is so extreme to the point where their drive to obtain tasty food is almost gone because they are willing to eat anything in order to survive.