Do you believe in incarnation? It is when someone says that he has two different souls, the present and past.
My theory, just an observation and might not be true at all and not scientifically proven, its just a spirit of Jinn, who possess the person's body, may be good or bad. It may took the character of former person who have actually lived in that period of time, as those spirit live longer then humans.
Share your thoughts, I maybe 100% wrong.