This is a bit of a rant I'm afraid.
I come from the standpoint of "your problems are your problems". If you're having a hard time then it can feel like the end of the world, even if people who have been through a similar thing know that it will be fine in the end - teenage heartbreak, smashing your favourite cup, having manflu, losing your job, just feeling a bit down.
I have "you are blessed" fatigue at the minute. I also have Marie Kondo fatigue, but there you have it. If someone is having a rubbish time then it's OK for them to say so, we all know there are people worse off than us, it doesn't mean we can't ever feel like crying, or feel that there's no light at the end of the tunnel. We're finally starting to get over the stiff upper lip aren't we, it's good to talk about our feelings and our struggles, at least in part to know we're not alone. Telling someone who is having a bad time they should be glad they're not in *insert horrible life-or-death situation* isn't helpful. Be a friend or remain silent is surely the best policy.
Just to add, nothing bad is happening in my life at the minute but I've heard friends of friends say it to someone who is having a hard time and it makes my blood boil.