As we being to think about ethics it is important to distinguish between ethical behaviour and two similar types of behaviour.
Rules of Etiquette
"You should wait for the host to sit at the table before starting to eat" is a statement of etiquette. Statements of etiquette are not considered to carry the same weight as ethical statements and while generally accepted ethical standards cannot be changed by rule books or authoritative bodies like government, rules of etiquette can.
It might be legal to allow a certain toxic chemical to be vented into the atmosphere but does that make it acceptable to society? In other words, the fact that a particular action is legal does not automatically mean it is acceptable from an ethical perspective.
And if an action is illegal, that does not necessarily mean it is unethical. For example, a law in a repressive society might say that it is illegal to hold public meetings but that does not make holding public meetings unethical.
Ethical standards should therefore not be confused with the law.