The stranding of the boys on the island can be viewed as a horrific social experiment in which man's inhumanity to man can be seen to exist in everyone to some extent. The way the boys quickly go from civilized young people to brutal savages is startling.
For example, as early as Chapter Four, evil becomes reality. Golding does not mince words. He states over and over that evil has pervaded the camp. Scott Gerenser of RIT University explains it this way: "Roger's first showing of aggression foreshadows his becoming a very evil and sadistic figure, Jack's invitation to watch him paint his face is the start of their "evil friendship." Jack's mask of face paint represents a cover that he can hide behind, which liberates and frees him, allowing him to do anything when wearing it, without worrying about any important matters."
By Chapter Five, the mysterious evil of the beast is introduced: "Simon is the only one to realize that there really isn't any "beast," but just a force of evil or savagery inside all of them that can manifest itself in different ways. The boys are beginning to split into two factions, those that support Ralph and those that support Jack and his more savage ways. The conflict between them is continuing to build up."
By the conclusion in Chapter 12, "The fire set on the entire island shows the tribe's complete lack of foresight, as if they were not rescued, they would have no food or shelter. Ironically, the fire meant for evil started by Jack turned out to be what got the boys saved. The arrival of the Naval officer thus seems like a happy and ironic ending, but if one digs deeper it is just a continuation from one war to another. Once all the boys get on the Navy cruiser, they'll most likely just be subjected to more battle and fighting, this time on a worldwide level, due to the war taking place in the outside world."
The fact that the boys are rescued but thrown back into the evils of war is Golding's way of showing that evil is not an isolated incident on an island, but a pervasive aspect of human nature.