The entire narrative of "The Sixth Sense" is a masterful act of misdirection culminating in one of modern cinema's most famous twists: Dr. Malcolm Crowe has been dead since the opening scene. He did not survive being shot by his former patient, Vincent Grey. Every scene following this is shown from his perspective as a ghost who does not realize he is dead.
This revelation reframes every interaction Malcolm has. His wife, Anna, is not giving him the silent treatment; she is grieving alone and cannot see or hear him. Their anniversary dinner is just her, sitting alone at a table, sadly remembering him. He never physically interacts with any character other than Cole, who is the only living person who can see him. He doesn't open doors, move chairs, or pick things up; the camera always cuts away or other characters perform the action. His inability to open his basement office door is not due to a lost key, but because his wife has blocked it with a heavy deskβa change to the house made after his death that his ghostly perception cannot process.
Cole's famous line, "I see dead people," is spoken while he is looking directly at Malcolm. Furthermore, his explanation that ghosts "only see what they want to see" and "don't know they're dead" is a direct, albeit unrecognized, diagnosis of Malcolm's own condition. The final proof comes when Malcolm's wedding ring falls from Anna's sleeping hand. He sees that his own finger is bare, and the memory of his fatal gunshot wound returns, finally shattering his denial. His purpose as a ghost was to help Cole, an act of redemption for failing Vincent, which in turn allows Cole to help him accept his own death and say a final goodbye to his wife.