Knowing Okinawans they definitely think the spirit helped Teru. Some Okinawans are still religious to this day that outsiders are not allowed in sacred spots where rituals are still performed.
So by their thinking, they probably believe the spirit helped Teru.
It's just a guess.
Or...
The author just needed a punchline to end this chapter.
I think it's less "cheating" and more "oh, so you didn't learn anything." Considering that we just learned that 'cheating' means 'getting lucky' as far as the dialect is concerned, he's probably scolding him for not knowing any of the answers even though he got a 100.
i once randomed all questions in a multiple choice quiz and got a 95% (almost perfect, im using a general term since my country probably uses other score systems)
the teacher was pissed but couldnt really do anything about it lmao