Maybe that seems a self-centred way of thinking to you. Most people seem to want to believe that their actions are motivated by compassion. However, I don't think this is incompatible with a compassionate system of thought: if you're in a situation where people love you and vest their trust in you... where they invest in you in other words... do you really have the right to take a high risk on yourself?
Maybe you have children or a job or something - I don't know. It would seem kind of selfish to risk the welfare of your kids to help one person right in front of you. To risk, beyond just your kids, all the others who are networked with you and benefit from your presence for the welfare of one person.
You can stand to lose those relationships if people attack you socially, and those people can stand to lose you. The cost of helping the wrong person is potentially all, and to all, you love and/or invest in.
From a compassionate standpoint I'm not sure that's a trade-off that makes sense anymore than it would from a purely selfish standpoint.
Helping upset people exposes you to risk. If their life is messed up to the degree that they're crying in public, there may well be a reason in terms of how those around them have tended to treat them, how they've learned to treat others, and how they manage their personal life.
Don't get me wrong - I'm not saying do or don't do it. But if you are going to do it spare a thought to your liabilities. In my experience upset people stand a massively above average chance of attacking you socially. Don't go (or talk!) anywhere alone with them, don't give them your name, don't touch them, don't tell them where you live. Try to avoid talking to children at all, that's a whole bucket of crap you don't want to mess with.
You only have to comfort the wrong person once to do incredibly damage to your social and professional life. Think very carefully before you involve yourself in anyone else's life.
Personally I don't do it for anyone I don't know well and consider to be fairly stable anymore, it's just not worth the risk to me.