"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 joke had become widespread by the 1890s,when a pun variant version appeared in the magazinePotter's American Monthly: