Light Yagami's obsession with justice and righteousness is primarily driven by his strong sense of superiority and desire for power. He believes that he is the one who can bring about a perfect world by eliminating criminals and creating a society free from corruption. This belief fuels his obsession with the idea of being a "god" of justice and dictating what is right and wrong in the world. Additionally, his experiences and personal beliefs also contribute to his distorted view of justice, leading him down a dark path in his pursuit of what he believes to be true justice.