My conspiracy theory
The scene of the main character hitting the boy was initially in the beginning, explaining all of the hallucinations. But the director decided that he could completely change the genre of the film and use that as a large plot twist by putting it at the end.
Just a theory.