Why did the Chinese build the Great Wall?

Picture a wall so long it crawls over mountains, slithers through deserts, and disappears into the morning mist. People sometimes say it's a single wall built all at once. Plot twist: it's actually many walls, built by many people, across many, many centuries. So the real question is — why did anyone start building in the first place?
Long ago, northern China was farming country. People grew millet and rice, kept animals, and stored grain in their villages. Just beyond them stretched wide open grasslands where nomadic peoples lived — skilled riders who moved with their herds. Two very different ways of living, sharing one border.
