You have identified what is decidedly odd about Jack's behaviour - he starts of by agreeing with Ralph that there is no beast and then later on says that there is a beast. It is key to note that Jack only changes his mind after fear begins to run rampant through the group. He is obviously trying to manipulate and play on the fear of the boys to weaken Ralph's leadership and gain more power himself. His supposed belief in the existence of the beast is designed to encourage the rest of the boys to put their trust in Jack and his group of hunters, who are able to hunt it down and kill it. You can appreciate Jack's cunning here - if the boys need his protection they will be more accepting of his acts of savagery as they need the protection that Jack and his hunters can provide. Of course, the other side of this is that by putting their safety in Jack's hands, they are allowing the power of the beast (and the instinct of human savagery that it represents) to be expressed in their own lives. Jack very cleverly exploits the beast to gain power and to give further reign to savagery.