The naval officer symbolizes plenty of things: First, it is a paternal figure which the boys desperately need. Second, it is a figure of authority and salvation, which the kids are also desperately in need of. Third, it is the first contact the boys have with the outside world. Fourth, it is a figure of discipline, order, and organization- those are the very things that the boys lost when they were left to their own devices. Fifth, he represents reality. Even the Naval Officer himself was a bit grossed out at the state of the children, and the children did not respond to him in a child-like or infantile way: Instead, everyone was shocked in both sides, and that is the same way reality hits- shockingly at times.
Finally, the naval officer represents salvation and a return to humankind. The boys had been living in a semi primitive state. How interesting that it is a NAVAL officer, one who commands the ocean (a very uncertain element) appears to re-organize and save the boys. Yet, naval officers equally follow nature's signs, and use objects to guide them through the most unreliable elements, and make it. Therefore, the naval officer is the ultimate salvation to the boys.