I think what OP means is that if a politician is doing shady, potentially illegal stuff behind the scenes, but he's doing it to benefit the people and in the end it only helps the average person in the country.
Like I guess for an example if a politician is laundering money but he's putting the money towards a social project that is beneficial to everyone and wouldn't get funded otherwise.