When Purrham received the hat, it was blessed by a voodoo witch doctor. However, another voodoo witch doctor, who was presumably jealous of Purrham, cursed the hat about 20 minutes later. This is one of many theories presented by the public, according to the Narrator.
All the successes and failures of it's previous owners have, over time, compiled into a frantic mash of emotional distress and conflicting viewpoints. This causes severe distress to all who wear it, and makes them act the opposite of their true selves. This is the theory presented by the Narrator himself, and has apparently been refused by popular opinion.
Purrham found the hat while venturing through the treacherous caves of the Nightmare Princess, when he found the hat, perched upon a giant ruby. However, the ruby was in the shape of a human skull! This is another one of many theories presented by the public, according to the Narrator. The Narrator showed distaste for this theory in particular.