In successive dynasties, our country has been carrying out continuous war of resistance, territorial expansion, self-defense war, of course, the most headache is that each dynasty has foreign aggression. In the face of these barbaric foreigners, the emperor had to expend a lot of energy to resist their attacks. In particular, war-torn dynasties are more likely to attract foreign tribes, who want to take advantage of the civil wars in various countries to catch turtles in an urn and profit from them.

We know that during the Three Kingdoms period, there was no harmony between the countries at all, civil wars often occurred, and in the face of such national conditions, there must be many foreign invaders to invade and occupy the Central Plains. Curiously, however, there are no so-called foreign tribes to attack. Those foreign tribesmen were very barbaric and fierce, even if Qin Shi Huang unified the jiangshan and had the greatest power, the Xiongnu dared to attack. Are these mercenary foreigners suddenly burned out of their brains? Where to find such a good opportunity, there was not a single foreigner coming. In fact, it is not that they do not want to, but they do not dare.
At the end of the Eastern Han Dynasty, the Han Dynasty had collapsed and had no meaning, but the princes were still one family. Although there were constant wars between the various princely states, this was still very united in the eyes of outsiders relative to the inside, so they did not dare to attack. Indeed, the power of the princes is still very strong, although the contradictions are constant, but in the face of foreign invaders, they will still work together to resist outsiders, and their united strength can almost reach the strength of the early years of the Han Dynasty.
During the Three Kingdoms period, there was also a clear division of labor between countries, Cao Cao stared at the north, Liu Bei stared at the south, and those people had no chance to attack. Although the Central Plains were in turmoil at that time, those Xiongnu and other ethnic minorities were not very strong, even if any one of the three kingdoms attacked them with all its might, they could not hold back. Not to mention three countries.
Civil war is one thing, and it seems to outsiders to be another thing. In their view, the strength of the Three Kingdoms is very strong, comparable to the han dynasty at its peak, how dare they attack easily, there is no hope of victory, good or bad. Not to mention the combat ability of the three great powers, the development of their economic strength is enough to stop them. There are also many generals, on the battlefield, they are all victorious figures, just listening to the name is enough to make their livers tremble, if they really fight, maybe they will die without surviving a reincarnation.
Based on the above reasons, the main reason why those foreigners did not dare to attack the Three Kingdoms was because they were afraid of their strength to cooperate, so unity was the greatest advantage in facing the enemy.