At the end of chapter 4, the boys re-enact the pig kill to demonstrate how they are descending into anarchy.
The pig-killing event shows the difference between Ralph and Jack has come to a head. It is the final evidence that Jack is barbaric and savage, and Ralph is civilized.
At first, the re-enactment of the pig-kill is just fun. Ralph asks where they found the pig, and the boys get excited and one-up each other telling the story.
The twins, still sharing their identical grin, jumped up and ran round each other. Then the rest joined in, making pig-dying noises and shouting. (Ch. 4)
The boys have already painted their faces like an ancient tribe, and consider hunting as a provider of more than sustenance. It gives them the rush they need. Ralph’s reaction shows how far he is distancing himself from them.
Ralph watched them, envious and resentful. Not till they flagged and the chant died away, did he speak. (Ch. 4)
Ralph says he is calling an assembly and walks away. It is his last attempt to return civilization to the island. The pig-dance demonstrates that he is losing control of the group, and it is beginning to splinter into two.
The pig dance also foreshadows the inevitable destruction of the boys’ society as they descend into anarchy. It is not long before they graduate from killing pigs to killing one another, as they lose all touch with reality. Simon’s death was an accident that resulted from getting carried away with the pig dance and the savagery it allowed.
This is a analysis about the hunt on the Lord of the Flies study guide from enotes.com
Ralph’s well-intentioned plans go horribly awry when the hunters abandon the signal fire to follow Jack after a pig. As a result, their first chance for rescue is missed. Jack downplays this by focusing on his triumphant hunt, but this only serves to alienate Ralph.
-enotes.com (Chapter 4 Summary and Analysis)