The Great Wall was primarily built to defend against Mongol tribes from the north, who frequently raided Chinese settlements. The Mongols were the main threat during the wall's major construction phases. Korea (A) and Taiwan (B) were not significant military threats during the wall's construction. Russia (D) as a major power emerged much later, long after the wall was built.