How? The banality of evil, cognitive dissonance and violence.
The "banality of evil" [1] is term coined by Hannah Arendt when covering the trial of Adolf Eichmann who killed over a million Jews in the HOlocaust. She described Eichmann as an ordinary, bland bureaucrat who was (in his mind) advancing himself in the Nazi Party. The term has been exapnded to describe how disconnected most jobs are from their outcomes through complexity. You might be working on an AI feature that just identifies from external phone activity when someone is home or not. Sounds harmless right? What if you knew it was used by militaries to assassinate journalists while they were home so they got their families as well?
This also feeds into the concept of "social murder" [2].
Cognitive dissonance was best described by Upton Sinclair [3]:
> It is difficult to get anybody to understand something, when their salary depends on them not understanding it.
Even if you, as a tobacco employee, realized the connection between what you were doing and selling more cigarettes, you'd find people rationalizing it by saying things like "I'm selling to willing buyers" or you'd couch it in terms of personal freedom.
Lastly, violence, specifically state violence. We (generally) have a skewed view of what constitutes "violence". We all understand that if you get attacked by someone in the street it's violence. Where it gets more contentious is for something like eviction. Many will say "well that's protecting somebody's asset". Others will argue that putting people out on the street, particularly in a wealthy country, is state violence [4].
I bring this up because we live in a society that doesn't guarantee basic necessities. So you need a job to pay for those things. Well, that's putting a proverbial gun to people's heads. If someone is selling tobacco, are you going to tell them they should risk homeless for that moral stance? Would you? I don't mean that as a provocation. It's a thought experiment. How much would you give up for a moral stance personally? What if it impacted your spouse? Your children? There was a time when certain jobs exempted you from the draft. What if you had one of those jobs and it was immoral? Would you go to Vietnam instead?
[1]: https://aeon.co/ideas/what-did-hannah-arendt-really-mean-by-...
[2]: https://en.wikipedia.org/wiki/Social_murder
[3]: https://rowansimpson.com/quotes/salary/
[4]: https://hnmcp.law.harvard.edu/hnmcp/news/evictions-can-kill-...