Oh, oh! I like this kind of thing, I theorize Spirits are created from the people that died within dungeons in the past, and the amount of past memories each spirit has depends on multiple factors, like how strong their will was, how close they were to something, if they triggered things by seeing or doing something important in their previous life, etc.