When a person dies, their soul leave the body and departs for the afterlife. There are ways for a person to be resurrected, however. The first involves calling the soul back into the mortal realm and entrapping it inside a specially built core. This core is specifically designed to contain souls that have passed on in the world of the living. This core is then placed inside an artificial construct called a golem. The soul interfaces with it, giving it control over the construct. These golems are programmed for certain purposes, say guarding a shrine, and the soul cannot step beyond those parameters given to the construct. These souls can operate so long as the construct remains intact. If they are ever destroyed, the soul departs its artificial shell and returns to the afterlife. This form of resurrection is voluntary, discussed prior to the person's death as an honor or form of repentance for crimes committed during life.
The second way of resurrection involves resurrecting someone back into their original body. The body must be in relatively good condition and not long after death. The person who comes back is called a revenant. This being looks exactly the same as the person did in life, but with grey skin and black veins over their form. Revenants have the memories of the person as well as their personality, but without their positive traits or characteristics, creating a darker and more sinister version of the individual. Unlike their golem counterparts, this being retains its free will without restrictions. These revenants are also immortal, repairing themselves if they are ever destroyed.
I need a way to explain the rules of this resurrection system in a way that satisfies these parameters. For a person to come back the way they were in life originally, they would need to be housed in these golem structures. However, resurrecting a person back to their original bodies changes them, making the individual evil and removes their positive traits, highlighting only the negative ones. How can I justify this?