"Why did the chicken cross the road?" is a common riddle joke. The answer or punch line is: "To get to the other side." It is an example of anti-humor, in that the curious setup of the joke leads the listener to expect a traditional punchline, but they are instead given a simple statement of fact. "Why did the chicken cross the road?" has become iconic as an exemplary generic joke to which most people know the answer, and has been repeated and changed numerous times over the course of history.
The riddle appeared in an 1847 edition of The Knickerbocker, a New York City monthly magazine:
There are ‘quips and quillets’ which seem actual conundrums, but yet are none. Of such is this: ‘Why does a chicken cross the street?[’] Are you ‘out of town?’ Do you ‘give it up?’ Well, then: ‘Because it wants to get on the other side!’
The joke had become widespread by the 1890s, when a pun variant version appeared in the magazine Potter's American Monthly:
Why should not a chicken cross the road? It would be a fowl proceeding.
There are many riddles that assume a familiarity with this well-known riddle and its answer, for example by supplying a different answer, such as "it was too far to walk around". One class of variations enlists a creature other than the chicken to cross the road, in order to refer back to the original riddle. For example, a turkey or duck crosses "because it was the chicken's day off," and a dinosaur "because chickens didn't exist yet." Some variants are both puns and references to the original, such as "Why did the duck cross the road?" "To prove he's no chicken".
Other variations replace side with another word often to form a pun. Some examples are "Why did the chicken cross the playground? To get to the other slide" or "Why did the whale cross the ocean? To get to the other tide." A mathematical version asks, "Why did the chicken cross the Möbius strip?" "To get to the same side." Alternatively, the punchline can be regarded as the chicken "getting to the other side" as a euphemism for death, and crossing the road being its method of suicide.
Another class of variations, designed for written rather than oral transmission, employs parody by pretending to have notable individuals or institutions give characteristic answers to the question posed by the riddle. As with the lightbulb joke, variants on these themes are widespread.
Source: Why Did The Chicken Cross The Road?