It’s always been an amusing quirk that the character who heads the task force wasn’t pursing the world’s most prolific serial killer for moral reasons, but rather for his own amusement. In fact, there seems to be a massive juxtaposition between the L at the start of Death Note, and the L we see when the task force finally meets him in person.
Partially I think this is because Ohba didn’t fully know what he wanted to do with the character at the start of the series. The early L looks composed, almost handsome when we see his face. He talks about how Kira is evil to the International Criminal Police Organization with deep passion and seems to truly believe it. However, in the Death Note One Shot L tells the children of Wammy House, “It’s not a sense of justice. Figuring out cases is my hobby. If you measured good and evil by current laws, I would be responsible for many crimes.”
L Describes his Morality in the Death Note One Shot
Whether or not you agree with these actions is moot, he’s prepared to kill criminals to catch a man who kills criminals. This is morally self-defeating in the worst way possible. The most consistent look at L (at least from the manga and anime) is one who, while not completely without redeeming features, isn’t concerned with higher values.
L, is in many ways the antithesis to Light. Whereas Light is handsome and meticulously dressed, L is dishevelled. Light is charming; L is almost autistic. Light is extremely moral; L doesn’t seem to believe in morals.
The only traits they do seem to share is that they’re both chronic liars and are extremely brilliant.
I doubt L ever thought about his Philosophy in these terms; but he is fundamentally a materialist thinker. Materialists believe that there is no objective morality and good and evil are entirely human concepts (think of Hamlet’s famous proclamation, “There is nothing either good or bad, but thinking makes it so.”) and that existence is entirely physical.
It’s not hard to view L in such terms.