I used to think the purpose of hats was to keep your head warm, to keep the sun out of your eyes, and to look cool.