Garden path sentences are an interesting study in Linguistics.
Essentially, as one hears or reads a sentence, their brain automatically begins to try to figure out what the next word or type of word is going to be.
Let's take the sentence: The brown dog is good.
From the time your brain processes the first word, 'The', it's already taking guesses at what the next word might be. It knows, thanks to what English your mommies taught you in your crib, that only certain types of words can follow the article 'The'. A noun certainly is likely to come next, but so is an adjective, as a few other things. More importantly, however, your brain throws out the possibility of words which would not fit with its interpretation of the sentence. Therefore, if somebody said: "The bravely..." You'd subconsiously stop listening to what they after the second word, since 'bravely' is an adverb and cannot follow an article. Only if our brain hears what it expects will the sentence make sense.
There is, however, an interesting bit that arises when the sentence is gramatically correct, but doesn't fit with the way your brain has parsed what it's heard already.
For example: The horse raced past the barn fell.
Everything is fine until you reach the word 'fell' at the end. Our brain either expected that to be the end of the sentence, or for a conjunction to follow, which would link another idea onto the end. The verb 'fell', simply hanging on to the end, just doesn't work.
Proper parsing of this sentence usually requires a second run-through, with a different method of parsing The actual meaning is as follows: The horse (which was) raced past the barn fell.
While the first sentence is certainly grammatical, the fact that it makes little to no sense offers us keen insight into how the brain processes language.
To finish, here is a list of some more garden path sentences for you to figure out.
The raft floated down the river sank.
While Mary was mending the sock fell off her lap.
The florist sent the flowers was pleased.
The cotton clothing is made from grows in Mississippi.
They told the boy that the girl met the story.
The daughter of the king's son admires himself.