In the original
Alice's Adventures In Wonderland (not the
Disney version, mind), it is explained that the Mad Hatter and his friends (the
March Hare and the
Dormouse) are trapped in their eternal
tea party because the Mad Hatter had a
falling out with
Time.
It was at a concert being held by the
Queen of Hearts. The Hatter was to sing the song "
Twinkle, Twinkle, Little Bat", and he had only gotten past the first verse when the Queen accused him of murdering the time and threw him out. Ever since then, Time and the Hatter have been on bad terms, and it's always been
teatime for the Mad Hatter and his friends. Sad, really...
The Mad Hatter was the one who posed the riddle "Why is a raven like a writing desk?" to Alice.
In American McGee's Alice, the Mad Hatter is a more malignant figure, and also one of the game's bosses. Apparently, after being under the thumb of Time for so long, Alice's own instability has finally caused the Hatter to go from merely eccentric to full-blown insane. The Hatter is obessed with mastering time and precision, and commands a small army of clockwork automatons. He has the unfortunate March Hare and Dormouse turned into steampunk cyborgs and subjected to sleep deprivation experiments, and apparently had himself turned into an Automaton of sorts, since he has a large obvious gear sticking out of his back, he shoots missles from his fingers (thanx for the reminder Zerotime!), and his head explodes when you defeat him.