This is a great question. There are several points worth considering.
First, Golding is teaching us that the fear of the unknown is one of the most powerful motivators in life. The beast of the book controls the boys and Jack is able to rouse the boys to himself on account of this fear. What makes this even worse is that they leave the able and good leadership of Ralph. And keep in mind that no one even knows if there is a beast. However, the unknown is powerful. This is the point.
Second, Golding also intimates that fear is a destructive force in soceity. The boys become savages in time and all semblence of order is gone. Chaos rules.
Third, Golding shows us that it takes courage to fight fear. The one who exemplifies this is Simon. He speaks one of the most important lines of the book. He says: "What I mean is . . . maybe it’s only us." These words are profound as he battles the fear of uncertainty.