Apart from it being irritating on the receiving end, it is usually inaccurate. We don’t really know what people are thinking; we aren’t mind readers. And it usually isn’t in our best interest to make wild guesses.
Often, people say this when they are anxious about something the other might say. Often, it is coming from a negative interpretation of a situation. Or a guilty conscience. Just because someone thinks these horrible things about themselves, it doesn’t mean others are judging so harshly.
It is best for you to remain curious and let them tell you what is on their mind.