Why did the zombie eat a hat?

It thought it found the brains of the outfit