I don't know whether a poem has be there to help to develop something. I think it's there for itself, for what the reader finds in it.
A joke is not a thing but a process, a trick you play on the listener's mind. You start him off toward a plausible goal, and then by a sudden twist you land him nowhere at all or just where he didn't expect to go.
Cats are intended to teach us that not everything in nature has a function.