Whose leader has some rather unsavoury friends and prior associates?
ALL politicians, no matter how clean, have "some rather unsavoury friends and prior associates". As does every one else. Even Her Majesty The Queen has friends and especially associates who've done wrong, and I believe some who've even gone to prison.
I can guarantee that if not among your friends, then among your associates you have people who have committed crimes, some maybe serious, even if they've not been caught. For a start, there's me. Guilty of "sexual deviancy" (or however you wish to term it) including homosexual sodomy at a time when it was illegal for a start, as well as several traffic offences, a ton of "thought-crime" (some quite violent, thoughts of revenge and so on against someone who seriously hurt a loved one, and when poor and desperate some thoughts of "alternative means" to acquire money). I doubt I'm the worst here. You share a social-media platform with despicable criminals!
The role of MP requires that someone deals with people who have been accused and even rightly convicted of wrongdoing, whether trying to right some injustice against said person or trying to find better ways of dealing with their actions so there's no further trouble.
It is not who we associate with that tells our character, it is how we deal with the actions of those associates. If someone is about to act in a criminal manner, and you can bring them out of it in a way that does no harm, then you have helped better the lives of more than just your friend. If you instead shun your friend and let him go on to commit whatever act it was, then your friend and his victims are your victims; in protecting your character you have harmed others, and that makes you a much lesser person.