Human connections, interpretations and load balancers.
Us humans, we make connections and that's apparently what makes us human. We connect not like Bluetooth or infrared but like a cobweb. Each point is connected to many other points and all of those are connected to many others, there is no end to these connections.
But maybe our biggest problem is that we imagine too much. We, very conveniently listen to someone's rant (if we have the patience) and while the person is apparently "sharing" his feelings, we're halfway through the search of finding a similar situation in our lives to connect it with. It is worse when we actually think about those similar issues and discard the so-called friend's issues as "small problem, I've faced much more", at least in out heads at some point of time.
That's the problem, how can you possibly do that? Your friend is a different person, different goals, aspirations, actions and reactions to occurrences in life. You can't just generalize it and very conveniently pull yourself into the conversation. No, that's wrong.
There could be multiple reasons why this might happen:
A. You want to show them that people go through worse, so it's okay for your friend to go through this.
B. You actually don't know how to console a person and your competitive nature doesn't allow you to be second in any case, even if it's misery.
C. Your imagination is quite vivid, in that case you just imagine what should be the ideal solution and blurt that out to your friend. This is sometimes so bad that you don't even consider all the factors affecting the equation. It is like forming a bi-quadratic equation, with a bananas.
There could be more cases, but in all of the above cases you'll observe that people don't really think mathematically. You see, if we try to represent life in form of an equation, then it will be an equation with innumerable variables. You can't ever find solutions for these things! All you can do is that you apply conditions and bounding limits to these variables based on your observation of the or behaviour and then try and find a solution.
Hence, maybe sharing just leads to some misplaced sense of guidance and legit division of pain. As the person who is listening to you does find that icky memory out of his experiences to find solutions for you and you end up with some conclusion or the other.