Eu ia adivinhar que o Chapéu é capaz de ler os pensamentos dos alunos, mas alguém teve esse pensamento antes de mim:
The Sorting Hat is one of the cleverest enchanted objects most witches and wizards will ever meet. It literally contains the intelligence of the four founders, can speak (through a rip near its brim) and is skilled at Legilimency, which enables it to look into the wearer’s head and divine his or her capabilities or mood. It can even respond to the thoughts of the wearer.
Fonte: Pottermore (também conhecido como JKR)