What effect does “spoiling” this for the reader have, and how does this communicate one of the novel’s themes?

Why does Golding let the reader know what the “beast” really is before the novel’s characters find out? What effect does “spoiling” this for the reader have, and how does this communicate one of the novel’s themes?