China is not the only country in history that has built a wall on its boundary. Athens, Rome, Denmark and Korea also did the same in the past. The Hadrian's Wall in Northern England was also built to separate the Romans from barbarians. All were built for the purpose of defending their country against its invaders.
The primary purpose of the Great Wall was to provide a measure of protection and warning against impending northern (and sometimes southern) invasions. The Great Wall also served the purpose of preventing invaders from bringing horses in or stolen goods out.
Really good info to find out its purpose
The primary purpose of the Great Wall was to provide a measure of protection and warning against impending northern (and sometimes southern) invasions. The Great Wall also served the purpose of preventing invaders from bringing horses in or stolen goods out.
The Great Wall of China is a series of fortifications made of stone, brick, tamped earth, wood, and other materials, generally built along an east-to-west line across the historical northern borders of China in part to protect the Chinese Empire or its prototypical states against intrusions by various nomadic groups or military incursions by various warlike peoples or forces.
In Chinese history, Legalism (法家; literally "School of law") was one of the main philosophic currents during the Warring States Period (and before), although the term itself was invented in the Han dynasty and thus does not refer to an organized 'school' of thought.