One might surmise that the evolutionary function of humor was to make a person feel joy instead of fear when he experiences something that is totally foreign to his existing knowledge structure.
But I think this situation could only occur if the person had closed down his "implicit learning" system, because "implicit" (unconscious) learning automatically integrates new and different experiences, even if they're incongruous. That is its function.
Maybe Nature prepared us with a "sense of humor" to face this exact scenario where instead of keeping our mind open, we for whatever reason did keep our ideas fixed (like "encoding algorithms"!).
Is this system denied to lower forms of life? Why would it be? Of course, they don't have language and so "explicit learning" is denied them. But are they capable of shutting off their unconscious learning system, as humans are, and so hobbling themselves from seeing reality? Are they, like us, capable of keeping their knowledge structure from changing? If so, why wouldn't they too feel the sensation of "humor" (indistinguishable from other instances of joy) just as we do when having a totally incongruous experience? Just because they don't laugh, that isn't proof they don't feel joy!
Chinese sounds can be very amusing to the American ear, especially recordings that are made for children where the speaker is impersonating different literary characters. It is revealing that when listened to "unconsciously" these sounds are no longer amusing at all! They are merely more data to be integrated into the cognitive unconscious.