Goldberg Variation 30. a 1 Clav. 'Quodlibet'

Bach’s biographer Forkel explains the Quodlibet by invoking a custom observed at Bach family reunions (Bach’s relatives were almost all musicians):

As soon as they were assembled a chorale was first struck up. From this devout beginning they proceeded to jokes which were frequently in strong contrast. That is, they then sang popular songs partly of comic and also partly of indecent content, all mixed together on the spur of the moment. … This kind of improvised harmonizing they called a Quodlibet, and not only could laugh over it quite whole-heartedly themselves, but also aroused just as hearty and irresistible laughter in all who heard them.

Forkel’s anecdote (which is likely to be true, given that he was able to interview Bach’s sons), suggests fairly clearly that Bach meant the Quodlibet to be a joke.

This quodlibet is based on multiple German folk songs,[12] two of which are Ich bin solang nicht bei dir g’west, ruck her, ruck her (“I have so long been away from you, come closer, come closer”) and Kraut und Rüben haben mich vertrieben, hätt mein’ Mutter Fleisch gekocht, wär ich länger blieben (“Cabbage and turnips have driven me away, had my mother cooked meat, I’d have opted to stay”). The others have been forgotten.[13] The Kraut und Rüben theme, under the title of La Capricciosa, had previously been used by Dieterich Buxtehude for his thirty-two partite in G major, BuxWV 250.[14]