Symbolism, Imagery, Allegory
It's really very simple. The road symbolizes life, man. And on the yellow brick road that is life, things aren't always going to be easy. As you travel, you'll make friends and you'll make enemies. The further you go, the more you come to know yourself.
As Dorothy leaves for the Emerald City, the Good Witch of the North tells her, "It is a long journey, through a country that is sometimes pleasant and sometimes dark and terrible" (2.56).
Boy, is she right!
Dorothy and her friends see some beautiful sights, like fields of flowers and magnificent cities. But they also encounter a lot of obstacles and occasionally fall off course. There are friends they can count on, like the field mice (and each other). There are enemies who become friends over time, like the Winkies and the Winged Monkeys. And then there are the people you think are your friends but who aren't exactly what they seem, like the Great Wizard himself. Sound familiar yet?
As they travel, Dorothy and her companions often feel happy and hopeful. Sometimes they feel alone and afraid, but the dark moments always pass. The message seems clear: if you stay true to yourself and stay on your path—as in, keep on moving—good things will come. Eventually.