In Chaucer's The Canterbury Tales, every pilgrim is expected to tell a tale each night after dinner in order to pass the time. "The Miller's Tale" is a bawdy (vulgar) tale about a jealous carpenter with a young wife, Alison. She is sleeping with Nicholas, a learned man rooming with them. Absalom (the parish clerk) is besotted with Alison as well.
Nicholas hatches a plan to make the carpenter (John) believe that a flood is coming, such as the one in Noah's time:
...come Monday next, at nine of night,
Shall fall a rain so wildly mad as would
Have been, by half, greater than Noah’s flood. (329-331)
In telling John this, Nicholas plans that Alison and he can spend time together while John lies in one of the three tubs he has "hung them near the roof," suspended from the beams. There Nicholas instructs John to pray silently...and eventually falls asleep.
Meanwhile, Absalom arrives at the carpenter's house (the night John climbs into the suspended tub) believing John is away—in order to woo Alison. She is, of course, in Nicholas' company (and detests Absalom). She decides to play a nasty trick. Promising to kiss him (and the night is as dark as "pitch"), she sticks her bare bottom out the window and he kisses her "arse." She thinks this is funny, and she and Nicholas loudly laugh:
...cried clever Nicholas,
“Now by God’s corpus, this goes fair and well!”
This hapless Absalom, he heard that yell... (555-557)
Absalom leaves and goes to the blacksmith to borrow a "red-hot coulter" (a plowing blade that has been sitting in the fire); he carries it back to Alison and calls for another kiss. This time Nicholas sticks his bottom out the window thinking it a great joke, but Absalom is ready for him and hits his "arse" with the glowing hot metal of the coulter, branding his hind parts. In agony, Nicholas cries for water in a loud voice, that wakes John...
Hearing that “Water!” cried as madman would,
And thought, “Alas, now comes down [Noah's] flood!”
[John] struggled up without another word
And with his axe he cut in two the cord,
And down went all... (631-635)
When John cuts the "cord" with his axe, the tub falls down, ultimately resting on the ground. He has broken his arm, but is also further embarrassed when Nicholas and Alison cry for the neighbors to come and then pretend that John is crazy, obsessed with a belief that a "second Flood" is coming. Of course, no one believes John, and it seems obvious that he has been cuckolded.
In deciding if John deserves his fate, we should look to the era in which the story was written. Chaucer writes in the tale:
A man should wed according to estate,
For youth and age are often in debate. (43-44)
In essence, Chaucer (speaking through the Miller) notes that a man should marry as is appropriate to his age—failing to do so may create problems. From this standpoint, John gets what he deserves.
Nicholas has slept with another man's wife. Getting branded on the bottom seems well-deserved, first for having betrayed the trust of his landlord, and second, for thinking too well of himself.
Absalom is after what Nicholas has already won; his disgust at being so rudely used by the lovers seems a light penalty.
Only Alison escapes punishment. The Miller does not seem to think she deserves any. The Miller, however, is not telling a tale of morality. He...
...is an uncouth, unmannered and disgusting lower-class citizen… [but] a product and a true representation of the society he lives in.