The novel Alice's Adventures in Wonderland, written by Lewis Carroll, originated as a story to entertain the daughters of Henry Liddell. Carroll, whose real name is Charles Lutwidge Dodgson, came up with the story while he and the Liddell girls--one of whom was named Alice--were rowing in a branch of the River Thames. The young Alice enjoyed the story so much that she asked Mr. Dodgson (Carroll) to write it down, and he soon began expanding upon the initial short story. Within a year, his manuscript of Alice's Adventures in Wonderland was published. Some parts of the story we now know as the Alice in Wonderland narrative were inspired not by Alice Liddell, but by another Alice, who Dodgson met several years later.
From its conception on a boat in the Thames in 1864, the Alice stories have been for the purpose of entertainment. They do contain themes of morality and logic, but the primary purpose of this work of fiction is to entertain the reader.