To read a chant is a good way of remembering things. In the Middle Ages, most people could not read or write and paper and pencils were rare. You had to learn all important things by heart. Chants can be fun, here is one from Sweden:
Ole dole doff
kinke lane koff
koffetiane binkebane
ole dole doff
Ärtan pärtan piff
ärtan pärtan puff
semilimaka kuckelikaka
ärtan pärtan puff
This chant is from the early Middle Ages. Some of the words are Latin, the language used by the priests in their sermons. Of course, most people did not understand a word of what the priest was saying. When they tried to imitate him, the words became all twisted and strange. People made a joke of it and that is the origin of these chants.
The words spoken by the priests at the service were magical. This was very much the case with the words spoken at Holy Communion. The priest said:"Hoc est corpus" (This is my body). If you needed an especially powerful charm, these were the words to use. However, people did not dare to use exactly the same words as the priest, so they said "hocus pocus", instead. By adding "filiocus", the charm became even more potent. That word comes from the Christian confession, "filioque". So, if one wanted to make something very special happen, one said "Hocus,pocus,filiocus".