Employer: Do this vile thing.
Me: No, that would be unethical.
Employer: Oh, you're right, of course. Train Steve instead.
Me: No. <quits>
Besides that, some people will need to continue working as they search for another job, and training Steve could be parlayed into a rudimentary supervisory position on the resume. That helps if you ever intend to jump over to the developer-manager track.
Q: "Have you ever had anyone under you?"
A: "Yes. I was in charge of a trainee once."
Q: "How did that work out?"
A: "Great, until they gave him my old job, then fired me. Maybe we had a budget problem?"
http://time.com/64707/mary-barra-gm-safety/
"The program is formatted to recognize employees who contribute ideas, or those who raise questions about safety issues before they become bigger problems. Call it an internal whistleblower program."
Some states do have "social benefit" corporations as a thing, where their charter expressly states how they are to benefit society not merely make profit. But no state makes this kind of incorporation mandatory.
Employer: Do this vile thing.
Me: No, that would be unethical.
Employer: Oh, you're right, of course. Train Steve instead.
Me: Okay.
[later] Me: Steve is trained.
Employer: Great. You're fired. Steve, do this vile thing.