Ethics is a slippery subject. Different people have different ethical stances, so if I were to say “that’s unethical” to you, you’d be likely to misunderstand me.
One common ethical stance is utilitarianism. This stance purports to optimize collective welfare. I don’t know any NSA people, but it seems likely that they share a utilitarian approach to ethical decision making, and they define collective welfare as security from evildoers. Their ethical stance, therefore, causes them to cast a wide net to gather telecommunications data. (I’m speculating about their stance, not claiming it to be my stance.) Selfish interest is part of utilitarianism.
For example, if you have a utilitarian stance you might choose to refrain from having sex with strangers to protect your health and theirs.
Another ethical stance is deontology. In this stance you refrain from having sex with strangers because it’s externally defined as wrong. For example, “Do not commit adultery” shows up in one common collection of externally defined rules. If you say to someone, “that’s illegal” you’re offering an ethical opinion from a deontological stance.
A third stance is altruism. When operating in that stance, people value the welfare of others above their own welfare. Many who donate blood do so from an altruistic stance.
Real people have a combination of actual stances. And for most of us, our real, operative stances are not quite aligned with what we say our stances are. Almost nobody completely walks their talk on this stuff. That’s just reality.
An engineer who works through the night to repair a critical defect probably has a combination of ethical attitudes. Trying to make users happy is altruism. It may also be deontological — they’re violating their service level agreements with those users. It may also be selfish and utilitarian: losing face, losing revenue and getting fired are to be avoided. All that is fine.
Life is harder when different people have contradictory stances. The short life of Aaron Swartz is a tragic example of that.
Immanuel Kant proposed the “categorical imperative”. (Oversimplifying) he suggests that we should live and behave ourselves the way we WISH everybody would live and behave. Professional codes of ethics attempt to employ the idea of the categorical imperative to create a shared ethical stance.
Codes of ethics are helpful precisely because of the slipperiness of ethics. Good codes of ethics offer a common language. And they serve to convert various ethical stances into deontological stances–written external collections of rules to follow. They make it easier for us to predict each others’ ethical behavior.
So, a plea: when questions of ethics are up for grabs, let’s be explicit about our own ethical stances and generous when trying to interpret other peoples’ stances.