It's situations like this that makes me wonder whether there should be more efforts put into education and awareness regarding ethics in software engineering. We teach ethics to other STEM disciplines such as biotechnology and aeronautics, why is it left out of software engineering?
We had a course on it as part of my degree, I believe it was required for the course to be accredited by the BCS (British Computer Society), but I could be wrong on - this was over 25 years ago.