I believe it was from remarks about buddhism where I first heard about “wrong company”, or the idea that there are people who are just ‘bad’ for you.
Over time I’ve formulated my own notion of what that means:
It’s bad to be alone. But being with the ‘wrong company’ is worse than being alone.