One sad lesson I learned early on in my software career is, for every ethical stand you are willing to take as a developer, there's always some other developer who is willing set aside ethics or has a different set of ethics. Software needs some kind of baseline ethical standard, like a Hippocratic Oath. A line that we "shall not cross."
I remember my first job out of college, I was asked to write code that caused our software to cheat at a certain industry benchmark. I was very junior, but still realized it was wrong. I finally worked up the courage to tell my boss that I had an ethical problem with doing this and wouldn't do it, and to my surprise, he said "Oh, that's fine! We treat software developers well here. I'll just give you a different bug ticket to work on!"
Jim, a few cubicles down from me had no problem writing the benchmark-cheating code. It's kind of futile.