I'm not sure why this would be discriminatory (in law or otherwise) for engineers and not for doctors.
Maybe the difference is that (computer-based) engineers are expected to do unethical work in some situations and for some employers, and there is an unwritten code that they can pass the buck and won't be penalised just for "doing their jobs".