The image is of a hat with a lot of names written on slips of paper, and someone randomly picks one. It means that someone randomly picked your name from the available pool of people.
The idiom "pull your name from a hat" means to choose or select something randomly or without any particular reason or method. It suggests a random or arbitrary decision-making process.
Condescending or supercilious toward
Eat your hat: a statement made when you are positive that something will happen, as in "I'll eat my hat if our team loses this game."
The name of a traditional magician's hat is a top hat. This is the hat that magician's use to pull rabbits, birds and scarves out of.
It means to do something surprising. The phrase is associated with 19th Century magicians who performed this trick.
To do by way of magic.
It was a phrase. "Hold on to your hat, there is going to be a bumpy road ahead"!
You had to take your hat off to him based on his success.
Literally, this is going to be a fast, rough ride and your hat will blow off if you don't hang on to it. Figuratively, we're going to do something fast with few precautions.
Nothing. I'm afraid you've got the idiom incorrectly. Perhaps you actually heard "a bee in her bonnet," which means that someone has an idea that won't go away, as if there were a bee in their hat that they could not ignore.
John loved to dance and would do so at the drop of a hat.
Talking through your hat means that you saying something that doesn't necessarily make any sense.
The correct idiom is a bee in your bonnet. The image is of a bee flying around inside your hat, worrying you.