At the root of every ethical system is a vision of what a perfect society would look like. Ethical conduct then is conduct that is in harmony with that vision, and unethical conduct is actions that are disruptive of that vision.
The variations in how we evaluate morality come from the fact that we have different ideas about what an ideal society would be like. For some, it’s as simple as saying that it’s a society that obeys all of God’s commandments; that will lead to a very specific ethical code. For others, it will be a society in which each person has the freedom to do whatever he wants as long as he doesn’t harm others in the process; that will generate its own, less specific, ethical code. For someone else, a perfect society is one in which the individual’s interests are completely subordinate to those of the collective; here too, a different code will result.
Any variations on the ideal will modify the ethics associated with it. If you start from the utopian ideal of the cohesive national unit, for instance, then specify that only the “Arian” people should hold power, you get the skewed ethical system of Nazi Germany.
There will be a certain amount of overlap in most visions of how society should work, so most ethical systems will abhor certain core “wrongs”, like random killing.