I understand people who say this rationale, but it doesn't make it ok. To me saying this to someone, makes them feel their issues aren't "valid", and equivalent to what they proceed is a justifiable reason to feel as you do. It doesn't matter what anyone else is dealing with, all that matters is you're in pain and suffering in some type of way. It's all you, you , you and that should be their focus if they want to help you.
You know people are funny. They want us to open up and when we do try, they simply are quick to throw those stupid phrases to us, dismiss how we feel and try to justify a reason why we are suffering.(the Bible this, oh it's karma, God wants your attention, etc)
If you don't understand us, the best you can do is simply listen and offer words of encouragement or simply ask if there is anything they can do to help.
Don't ever let anyone make you feel your situation isn't validated and how you feels is appropriate. If you take 2 differnt type of situations and try to compare them (which id never do) I can guarantee you, both people feel exactly the same!
I highly advise you tell whoever is saying these things to you that it's hurtful and to stop it! Set your boundaries and that can be one of them. Tell them on your bad days this is what I expect from you. If they continue, then I would stop communicating with them on your bad days. Wish you the best