The zookeeper only appears at the beginning and end of the story and doesn't say or do much. He stands in front of the lion's cage, hands in pockets, looking proud of his zoo. Although his role is small, he remains an important character. The zookeeper provides the push for young McGrew's imaginary travels and adventures.
Children have wonderful imaginations, but they usually need something to get the juices flowing, a primer if you will. Usually this primer comes from the world of adults. Did you ever notice how children continually play games centered on activities adults do as jobs: cooking, driving, construction, playing doctor, and on and on? Even the most fanciful flights of fantasy need something grounded from which to take off.
The zookeeper is McGrew's primer. The boy doesn't just imagine himself as a zookeeper but as the zookeeper. This is evident by the picture attached to stanza 3 where McGrew takes on the exact position, stance, and clothes of the zookeeper. From this point, McGrew does as he pleases within his imagination, but he needed a little bit of reality to get him started. Mr. Zookeeper, thank you for providing the bit.