Why do some spirits go to heaven when they die and some stay here as ghosts?

There is no proof that anyone has gone to heaven or, for that matter, any proof that heaven is even real.

This is good too, because there is also no proof that spirits are real as well.