to be friends with people that others disapprove of
get into / keep bad company
Definitions from the Oxford Advanced Learner's Dictionary, 9th edition