Why do people tend to avoid desperate people? From my experience,often in social interactions, the person who seems more desperate is the least desirable person to be interacted with. And no one wants to engage them.

More often than not, people seems to avoid desperate people,even when that person needed help most. An example would be a beggar on the street, if group of pedestrian walk by a beggar sitting on the ground, most of us would ignore and continue our journey. (I myself did this before)
Even though the beggar might be in a dire situation (i.e Hunger, No Shelter)

Is there psychological theories on this that describe the avoidance or disgust from desperate people?
From a personal standpoint I would avoid these people because I expect people to be continually getting such needs met. I would wonder why a person doesn't already have a support network in place and be suspicious of them.

I the situation with the beggar I would think this would link more closely to the bystander effect whereby as an individual you feel less inclined and less responsible as there are many other people in the vicinity that could also make a difference.