I have never been fond of the user of alignment in RPGs, it always felt unnatural, and an attempt to simplify the complexity of the world.
In D&D, the main argument for the existence of a distinct and defined good and evil in the universe (not just in the rules), are the Detect Evil and Detect Good spells.
So, what if those spells do not really detect good and evil, but rather something else? Here are a couple of possibilities:
The Spells are a Conspiracy
The Spells detect nothing, rather the users use them as a way to convince people that their side is right… This would work in a very dark fantasy game.
The Spells Measure Compliance with a God’s Law
In the case where spells are granted by a deity, the Detect Good/Evil spell measures the extent to which the individual target complies with God’s law. For a benevolent deity, this would mean that it would pretty much function as expected, but depending on the God, results may vary. Perhaps the God has a prohibition against eating fish, so all fishermen detect as evil?
This also explains how whole species in the D&D universe can detect as evil… The Gods just do not like them.
This also means that the followers of different Gods may get different results when casting on the same person.
The Spells Measure how Evil Somebody thinks they are
In this case, somebody could detect as evil when they are just guilty of minor things, while genuine psychopaths slip by…