Laura Payne, who runs the wonderful linguistics blog, A Walk in the Words, breaks down the concept of zero anaphora with the following joke:
A wife asks her husband, “Could you please go shopping for me and buy one carton of milk, and if they have avocados, get 6.”
A short time later the husband comes back with 6 cartons of milk.
The wife asks him, “Why did you buy 6 cartons of milk?”
He replies, “They had avocados.”
Zero anaphora is a linguistic term that means to refer back to a term that provides the information necessary to interpret the gap.
In the first line of the joke, the gap could be referring to either the milk or the avocados. It makes sense to assume that the gap refers to the closest noun, (the avocados), which is why the joke works.
Destroying jokes to explain linguistic concepts, one day at a time.
(via A Walk in the Words)