proverb

Misery loves company

misfortune

suggests that

It is solace to have company in difficult times; People who are sad, often like to be around people, in order to forget their misery.