Ralph gets on to Simon for wandering in the jungle at night. Ralph earns a few chuckles from the other boys when he guesses aloud that Simon might have using the restroom, but the reader understands that Simon prefers being alone and visiting his special place in the jungle.
Ralph does need to maintain his authority with the other boys and littlums, so he has to address Simon's disappearance. He makes an example out of Simon in front of the other boys to calm the littluns and so they will not believe that they can just wander off whenever they want. The idea of the beast still looms in the boys' minds, and Ralph may also be thinking in terms of safety when he warns the boys not to go out at night.