I imagine the Gods reincarnated him to be a hero or w/e but he didn't like that so he tries his best to be the villain. Behind the scenes, the Gods have a Book of the World that contains knowledge of all the lands, animals, and people. Every time he tries to be the bad guy, one of the Gods rewrites the section of the story so he ends up doing a good deed instead.