I read about Volkswagen yesterday and felt disgusted — they shipped some software with their diesel cars that would detect when it was undergoing emission testing and significantly change the car's systems to cheat the numbers. The rest of the time, your vehicle would emit as much as 40x the pollution.
Not only did some executive at VW come up with the cheating idea, but someone else approved it. And then the project was handed to the developers, and they did their jobs.
I don't know if the developers questioned it, pushed back, or were upset. Maybe some even quit over it. But someone built the feature. It shipped.
You can choose to work on things you believe in, and you can refuse to work on things you don't agree with. Think for yourself. Do what's right. Don't do what you're told unless you believe in it. Refusing to make something bad can be more impactful than helping to make something good.