I don't see why we need to do that, either. After all, if a doctor wanted to be evil, do you really think a code of "don't be evil" is going to deter him?
But it would stop the person from doing evil as a doctor.
The lab coat alone carries weight that magnifies the amount of evil that an evil person can do.
A doctor or nurse that kills patients out of evil, leveraging their position of being able to see patients, should obviously not be allowed to see patients.
Similarly, programmers that do evil, leveraging their position of being able to program a computer for a company, should obviously not be allowed to program for a company.
Setting aside things like rehabilitation, of course.
But there are definitely documented cases of doctors and nurses using their power to kill or to abuse the disadvantaged.
Taking away that power, once it is abused, is key.