For what purpose does Jack use the chant and the dance?
At first the chant and dance make "Jack's side" seem fun and exciting. While Ralph is concerned with building shelter and making rules, Jack wants to have fun and hunt. The chanting and dancing attracts some of the other boys to Jack and his way of living on the island. It also gives the boys a sense of belonging to Jack's group.
Later the chant and dance become more sinister. At one point in Chapter 7, they use the chant when they pretend to kill a pig with Robert acting as the pig. Robert is actually hurt in this pretend killing and as the boys chant and dance, readers can see something very animalistic coming over them. We see savage coming through them as they sing and dance.
And then of course, this progression into savagery is complete when they kill Simon in Chapter 9. Here again they are chanting and dancing and have lost all vestiges of their former civilized selves. They are completely caught up in the chanting and dancing and kill poor Simon attributing the incident to mistaking him for the beast.
Psychologically speaking it is highly unlikely a child of his age had any "planned" reason for using the chant, and dance. It is more of a primal instinct than it is a choice "to do or not to do."
Such social rituals have existed in human culture for thousands of years. They create group identity. Rituals have a great deal of symbolic value to humans. They feed spiritual or emotional needs, strengthen social bonds, demonstrate respect or submission, state one's affiliation, earn social acceptance or approval, or sometimes just for the mere pleasure of it!
In the Lord of the Flies that chant and dance would have filled the boys with a sense of belonging. Anyone who chose not to partake in such activities would be considered an "outsider" to their group, and often outliers are viewed as threats to the social cohesion of the group. When social groups feel threatened it can get really violent as is demonstrated in the book. All religious wars have been fought because of the "threat of the outsider."