This goes to the definition of "ethical", and it's distinct from "moral", in the sense that ethics are a codified set of rules or guidelines: one does not judge something as ethical based on the result, but based on its conformity to a set of explicit or implicit expectations of conduct.