Well ghost are formed from unresolved issues from a former life. Not only is it their only memories, it's also their purpose, and they can't move on unless those issues are resolved. So it unknowingly guides every decision they make. Even if they deny it or try to pretend otherwise. With Danny definitely in the former and not the ladder.