To add to Mike's excellent answer, the first time I was introduced to this joke was in a lesson about homophones. As as child this silly joke was a perfect example, and much easier to understand then something like "Did the two of you go to the park too?"
Homophones are words that sound the same but are spelled and mean different things. For example ate (past tense for eat) and eight (the number).
In the case of eight and ate, even children can tell when to use them. But with too, to, and two, many adults can't even tell when they are being properly used.
Some really common English homophones are:
- two, too, to
- they're, there, their
- eight, ate
- then, than
- are, our
As a child, many of them are too confusing to easily tackle, but ate and eight, are simple. Especially if you write 8 instead of ate. And so this little, simplistic joke was used to demonstrate homophones, and how getting them wrong could change the meaning of the sentence.