Doctors protect life, and lawyers keep you out of jail. I guess software engineers can take an oath not to kill people or put people in jail, but after that it's your morals vs. mine, no? And if I work for the Department of Defense making missile guidance software, then it's OK to kill people, I suppose...
Making missile guidance software is wholly unethical and is what we should be striving to prevent engineers from working on.
The number of doctors or prospective doctors who deny the medical code of ethics is very nearly zero. Almost all debate around it centers on subtle questions like defining 'harm' in self-determination cases (e.g. assisted suicide). The number of lawyers who would reject a given the legal code of ethics is perhaps larger, but the code is accordingly narrower. Lawyers are for instance free (and in fact obligated) to support "not guilty" pleas by clients they know are guilty. The boldest parts of the code (e.g. that lawyers cannot actively lie on behalf of clients, or mingle personal business with professional work) are also the the parts which are regularly broken.
Striving to avert something you consider immoral is a sensible decision, even if other people dispute that ethic. But doing so with a professional code of ethics is not only a doomed task, it's one which dooms the rest of the code in the process.