Like depressed people, or broke people. Even if they were a nuisance
or otherwise underwhelming before.
It could be a moral sense of duty in deontology, as some people’s
goal is to reduce overall utilitarian human suffering, and even if the
person did bad things before, it is in the past and wouldn’t usually
make them feel any better.
Or it could be biological, or social, as humans are inherently used to
forming groups to increase survival rate, and have a huge sense of
empathy compared to other animals, so they know the pain (and sometimes
can feel it too!) of people in trouble. Additionally, of course, there
is a chance that the troubled people could be befriended, which helps
build a SENSE of community, even if it is really small.