For example, everyone loathes the example of banks re-sequencing customers' deposits and checks such that it's more likely to overdraft and net the bank a lucrative penalty fee. The business exec or MBA who dreamed up that scheme isn't the one who coded that in COBOL or whatever; it's the the software engineers who wrote that despised piece of code. But like 99% of the rest of us, software engineers have families to feed and they can't go on a moral crusade.
On the other hand, a software engineer who is making their mark in the world as an entrepreneur definitely has some choices. I suppose many of us can make an easy buck developing clever (and legal) sex/porn websites but many of us choose not to. We want to do something we wouldn't be embarrassed to show our mothers.
The Hippocratic Oath is more applicable to doctors because they have more professional independence administering medical care. Software engineers with day jobs do not have that type of autonomy.
EDIT to the replies:
I wasn't contending porn and naked bodies was unethical. Possibly awkward to explain to your parents yes, but certainly not unethical. Unfortunately, porn websites and the porn businesses are often a very shady (malware, fake singles ads, etc) and many of us choose not to get into that area.
As for the power for low-level software engineers to enact change in the world...
I would LOVE to lecture software engineers on morality. The "Fountainhead" Howard Roarke architect who blows up his building to remain true to himself is an incredibly appealing narrative. Howard did it and got the girl in the end, can't you do it too?!?
However, my standard for telling a software engineer what is right or wrong (that has serious personal consequences) is to back it up with a $100,000 check in my hand. This way, I can soften the blow of any consequences (e.g. his unemployment.) Since I can't do that, my words are just armchair lectures and empty platitudes. Besides, my words of wisdom are not really necessary. The software engineers are already morally troubled by it; they're just not in an easy position to override their managers.
Personally, I don't have to write questionable software but it's because I have the economic ability not to. My finances allows me to avoid writing software I don't agree with so it seems very wrong to use that as a pulpit for moral superiority over others.
I think many of the replies are being unfair to the life situation the typical software engineer faces. The rhetoric comparing the writing of code to optimize bank transactions to gassing the Jews" or "experimenting on babies" is unwarranted. Yes, writing code to engineer financials is distasteful but let's not get carried away with the counter arguments. The software engineers want to do good but they often feel powerless to do so. The harsh criticism levied by posters here does not change that at all.