At the end ideally there should be a twist in the tail which leaves the reader with a sense of wonder and satisfaction, thus making him more likely to read another similar book. If the content can also be humorous this is a great advantage. A chuckling child is a child relaxed and happy. He's enjoying an experience he'll hopefully want to repeat. Also humorous stories are good ones to relate to, and to share with, one's friends and a recommendation from another child is far more valuable than a recommendation from an adult.
Some adults regard humour in children's books as somehow second-rate.
If a child with a particular problem reads a funny book about someone with the same problem and is made to laugh at a situation, then he's also laughing at his own problem which will then seem less significant. In my own books I've used such problems as hypochondria, bullying, nagging, shyness, anxiety, etc., and have hopefully made them funny. Disaster Bag' the boy hero is so worried about the state of the world and its many daily disasters that he puts together a huge bag of articles he might need if ever he's in a bad situation. But when he puts his bag down in a park one day, an incompetent terrorist, being chased by a policeman, slips a bomb into it. The boy doesn't notice and goes around boasting how safe he is with the bag on his shoulder.