The Cheshire Cat of Lewis Carroll's Alice's Adventures in Wonderland is famous for his grin, and there's a reason he's smiling. In a Wonderland populated by madness, he knows he's mad, and his embrace of that lunacy has given him a sort of sanity, and wisdom. As Alice's greeter and inconstant guide, he tries to explain, in his sometimes infuriating style, that she's the mad one in Wonderland - in a world defined by insanity, sanity is madness. The Cat comes and goes as he pleases, with that indelible smile lingering as proof that he knows the secret joke, and he's even trying to tell you about it, if you would juts listen.
Lewis Carroll was a gifted wordsmith and even a subtly subversive satirist, and there's much in his works that pokes fun at London society in general (and certain mathematicians in particular). The Cat himself draws inspiration from a few different sources. The saying "grinning like a Cheshire cat" had been around for quite some time before Carroll's writing: Cheshire was a dairy county, and cats there were said to smile from all the milk and cream. Some claim that Cheshire cheese was molded into cat form to be sold, and if cut from the tail first, the smile would be the last thing to remain. The cat was further woven into Cheshire culture by a series of poorly-painted local signs that attempted to depict lions (the crest of some local minor gentry) but far more resembled simple cats.
Of course, Carroll being Carroll, there's more to it than that. One of his mentors was Oxford Professor of Hebrew Edward Pusey, a foremost scholar of Christian church history. His nickname was the Patristic Catenary, a reference to his familiarity with the chain of early church fathers - a catenary also refers to the shape of a chain hung between posts, a shape evocative of a spreading cat's grin. This is just one example of the layers of pun and wordplay Carroll excelled at - the thoughtful and creative folding of cat/catenary/puss/Pusey into a single cartoonish figure.
All of that being said, I like the Cat's style. He knows life is bizarre and the only way to survive it is to smile.