It's not just D&D, other guides have it as well, or something like it.Though with but few exceptions they aren't as strict,
One exception I can think of is in the Dangerous Journeys System. But there they are known as Ethoi, and evil and good as things are not included. At least not on a formal basis.
The conflict here is between order and disorder (control and liberty if you like), with two of the Ethoi being of the nature of top down while the other two are more bottom up.
Then there is the Ethos of Balance, which is the closest of the 5 to a DnD alignment. Here the goal is to ensure that things are balanced, and that there is no need to "redress" an imbalance. Prevention instead of reaction.
In addition, no Ethos is required of a Persona, except under certain conditions. Essentially, it is only those who qualify for and take the Vocation of Priest who must take an Ethos, and follow it religiously.
Though the Vocations of Witch, Witchcraefter, and Sorcerer do have to agree to a pact to promote evil, though that's not quite the same as an Ethos.
In any case, the prospective Priest must then align himself with a god or goddess of the same Ethos and uphold that deity's teachings. In return the cleric is restricted to what the god allows, but he does get benefits.
The Ethoi of Sunlight and Gloomy Darkness are both dedicated to order. To Law if you want to think of it that way. And while one (Sunlight) is a hopeful Ethos with Gloomy Darkness a despairing one, both do tend to see the common man as something needing direction and control.
In contrast the Ethoi of Shadowy Darkness and Moonlight see freedom of action as being desirable, though Shadowy Darkness does tend to take a pessimistic view of people.
Though one should note that a Persona is not expected to take an Ethos, or to follow it unfailingly should he do so. Unless a Priest, and Priests do need to be highly dedicated to the Vocation to have any real impact on the society they live in.
Of course when you read up on how Gary handled the matter in Mythus you'll note that he took a rather simple, strict interpretation of matters. Were we talking of "real life" we would have to note that kindness can come from cruelty, and cruelty from kindness. But to the young (say college age) such subtlety can make their hair hurt.
So in DJ how Gygax handled ethics (and morality to a small extent) does differ from how he handled alignment in DnD. In this sense Mythus is more realistic than his earlier work, and thus more open.
And before I go, I have more posts to read up on at What do I Know?