Obviously this argument is it can be applied to literally anyone. No matter how bad you have it, there's someone somewhere on earth living in worse conditions. Basically "There's always a bigger fish" but in the other direction.
But obviously they don't use this argument whenever anyone vocalizes any issues they have. They only say this when someone they dislike has a problem, as a way of belittling them, with "you are whiny and entitled" being the subtext (though they'll explicitly say this too sometimes).
Basically whenever someone says "other people have it worse" they are really saying "I don't care about you or your problems and I dislike you enough to vocalize this, now shut the fuck up". Either that or "You're talking about issues that don't effect ME. Only issues that effect ME should get any attention at all, now stop talking about issues that don't effect ME because people should only care about issues that I care about".