You are confusing the ability of a consciousness to believe whatever it wants and justify any action as a "moral code". This is what moral relativism is, whereby anyone gets to decide what is objectively right/wrong, i.e. moral. Truth does not work that way. What is right and what is wrong does not work that way. Truth is what is. Moral truth is what is right and what is wrong. Anyone who thinks moral relativism is justified as an objective methodology for engaging in behavior is mistaken because of how they improperly recognize how most people are making up whatever they want to believe to be right or wrong based on their subjective preferences, wants, desires, inclinations, wishes, etc., compared to the objectivity of a rational mind clearly determining what is right and wrong because it is always right or wrong no matter the time or place, not based on personal whims and wants at the time or place.
The truth, reality/existence of principles of moral conduct does not waver and change depending on shifting geographical locations or time periods. Only consciousness chooses to manipulate and alter these foundations of concern for others as well as themselves to recognize the others and care for their interests as well. To accept moral relativism as a justified way of living, is to lack understanding of moral principles and accept the fallacy of pseudo-"morally" relativistic subjective wants and desires overriding an objective determination of correct moral conduct towards others. Peace.