Only if such lawyers are unethical in how they go about doing this.
Lawyers who defend accused rapists are a necessity for a well-functioning justice system. The alternative is a process where the accused isn't permitted a legal defence, if they're taken to trial for serious crimes like rape.
Software engineers who spend their days forcing increasingly invasive advertising technology upon us all are not necessary. For the most part, we'd all be better off if they all downed tools.