China assimilated countless neighbors as it expanded from the Henan province to the entire modern state. So why did Vietman and Korea escape this assimilation? They are geographically close to China, and both were at some time controlled by China, and have strong Chinese cultural influence. So why are they independent rather than say the Baiyue people?
So the question you've asked is really generalised, so I'm definitely not going to be able to address all of it. I don't feel too comfortable with discussing Vietnam in-depth, so I'll focus on factors addressing factors that prevented China from assimilating Korea if you don't mind.
Background (Pre-Sui)
To kick it off, I think it's important to emphasise that modern borders do not necessarily reflect historic borders, populations, or settlements! This might seem obvious, but people often underestimate how much has changed. Case in point, the earliest "Korean Kingdom" we can reliably state existed was Gojoseon, which looked roughly like this at the time of the Han conquest of Gojoseon. The Han Conquest of Gojoseon was also shortlived and most of the territories taken would be taken by the nascent Goguryeo^[1] state which looked like this at its zenith. It isn't until the era of the Tang and Song dynasties do we see the emergence of what resembles the modern Korean state in Silla and Goryeo.
So why mention this? Well, it's because the most simple explanation for why China didn't assimilate Korea throughout history until the Yuan dynasty is simply because they failed to conquer the Korean peninsula, and because China had never held the entirety of the Korean peninsula under its sway. At best, various Chinese rulers believed that Northwestern Korea, once a part of the Han dynasty, should rightfully be reunified with China, but this view did not extend to the whole of Korea.
Sui Dynasty Era
Additionally, from 300 AD till the Sui dynasty, there was no significant threat from China to Goguryeo. During the Sui dynasty, we see practical action backing the view of Northwestern Korea being a part of China, as the Sui dynasty made 4 separate attempts at invading Goguryeo. However, these failed and actually helped hasten the collapse of the Sui dynasty and lead to the rise of the Tang dynasty.
Tang and Song Dynasty Era
During the early Tang dynasty, there was a significant concern in the Korean states of Chinese incursion and invasion of the peninsula. Emperor Taizong also held the view that Northwestern Korea should be part of China, and (breezing over a lot of history) would topple the Goguryeo and Baekje (which had allied with Goguryeo) states by 668. The Tang dynasty goal of establishing dominion over Northwestern Korea had been achieved! However, Tang rule in the region was unstable and marked with frequent revolt and rebellion, and the Tang were starting to feel the pains of maintaining their large empire as they faced conflict out West and struggled to maintain their military presence in Korea. A few years after the Tang had conquered Northwestern Korea, they would be forced out by the Silla state and the Tang dynasty would lose any effective control over the Korean peninsula for the rest of the Dynasty's reign.
In fact, rather than be on the offensive, the Tang dynasty worried about losing control in the Northeast region, thanks to the emergence of a state known as Balhae. Balhae threatened Tang control in Southern Manchuria and led to a short-lived Silla-Tang alliance aimed at restraining Balhae. While this failed, the shifting tides of power and greater concerns in the Tang dynasty that I briefly mention (here) meant that for the remainder of the Tang dynasty, the Korean peninsula would face no significant threat of conquest from the Tang dynasty.
The Song dynasty, while formidable, would make no further attempts at conquering Korea (Goryeo) and saw the Koreans as a potential ally rather than as a threat.
Yuan Dynasty Era
The first time Korea was truly conquered was under the Yuan Dynasty, which was ruled as a vassal state of the Mongol Empire. It is during this time that Korea would once again be invaded by the Han Chinese, during the mid 14th century. Under The Red Turban Rebellion, which led to the overthrow of the Yuan dynasty and establishment of the Ming dynasty, Goryeo would be invaded in 1359 and 1360, which significantly weakened the Korean Kingdom despite failing to conquer the state.
Ming Dynasty Era
Goryeo during the early Ming era was in tension with the Ming dynasty, culminating in 1388 when Goryeo sent an army to attack the Ming (which resulted in the overthrow of Goryeo and establishment of Joseon.) Even during the early Ming dynasty, Goryeo was not the primary concern of the Ming; instead, conquering and maintaining stability in Northern Asia, and greater interest in Southeast Asia primarily occupied the Ming. This can be seen in interactions such as the famous Voyages, the Ming invasion of Vietnam, etc. Additionally, following the collapse of Goryeo, the new, Confucian Joseon maintained a fairly peaceful relationship with their Ming neighbours (a policy known as sadae.) During this period, Joseon frequently sent tributes to the Ming dynasty and early Joseon kings maintained excellent relations with the Ming. Even in periods of Joseon internal turmoil, the Ming dynasty did not intervene. Notably, during the reign of Jungjong (who ascended the throne through a coup), Joseon reached the height of subservience to the Ming as Jungjong sought to protect his position in the kingdom. It is at this point that we see practices like this:
In reference to the Ming-Chosön relationship, interestingly enough, the dra- matically increasing frequency of special missions to Beijing was not the only new feature of the reign of Chungjong (1506-45, particularly after 1519). As mentioned earlier, it became a rule in 1522, at Chosön's request, that the impe- rial edicts issued to the people of Ming China also be transferred to Seoul via the regional commander of Liaodong, and this new practice was confirmed again in 1541 at the request of a Ming embassy to Seoul,70 even though this new rule was not always observed.
Yet the Chinese view of Chosön was still ambiguous and somewhat ambiva- lent as well. For example, the imperial edict would be formally announced to tian xia (literally meaning under the heaven) or zhong wai (literally meaning the inside and the outside), both of which might rhetorically refer to the world. In Chungjong's court, it was sometimes at issue whether Chosön was included in tian xia or zhong wai. Chungjong argued that Chosön was included in tian xia , while his officials disagreed, arguing that Chosön was external to China. In 1542 this controversy was brought to the Ming Board of Rites for an authoritative inter- pretation of the definition of such words, and the answer was, indeed, "not."71 This instance suggests that the Ming measure to have the imperial edicts announced to Chosön was considered an ad hoc arrangement, while Chungjong wanted to regard it as a new fixed rule.
The Ming for their part had little reason to invade Korea; an empire faced with many difficulties, sacrificing a large amount of wealth and military power to invade a friendly, powerful Kingdom would have very little benefit and a large amount of risk.
I'm not familiar enough with the Qing to address why assimilation didn't happen there, though the First Sino-Japanese War ended the tributary relationship between Korea and the Qing in any case and left Korea under the influence of Japan.
Conclusion
So in reality, the main reason for why Korea was never assimilated by China was because China never conquered Korea. Even under the Yuan dynasty, Korea was not a part of China; it was a client state of the Mongols. There was no opportunity to assimilate Korea during the earlier dynasties and every attempt to conquer Korea for a significant period of time after the Han had ended in failure. Even the Han conquest had been reversed and 2 of the 4 commanderies fell within a few decades. Meanwhile, during the period of great friendship between Ming-Joseon, a conquest would have been a foolish waste of time and resources, assuming that such an undertaking would have been successful in the first place.
Sources:
Tang China in Multi-Polar Asia: A History of Diplomacy and War. By Wang, Zhenping. University of Hawaii Press, 2013.
Empire’s Twilight: Northeast Asia Under the Mongols. Robinson, David. Harvard University Press, 2009
Huddling under the Imperial Umbrella: A Korean Approach to Ming China in the Early 1500s. By Kye, Seung B. The Journal of Korean Studies, 15, no. 1, 2010
Hey there,
Just to let you know, your question is fine, and we're letting it stand. However, you should be aware that questions framed as 'Why didn't X do Y' relatively often don't get an answer that meets our standards (in our experience as moderators). There are a few reasons for this. Firstly, it often can be difficult to prove the counterfactual: historians know much more about what happened than what might have happened. Secondly, 'why didn't X do Y' questions are sometimes phrased in an ahistorical way. It's worth remembering that people in the past couldn't see into the future, and they generally didn't have all the information we now have about their situations; things that look obvious now didn't necessarily look that way at the time.
If you end up not getting a response after a day or two, consider asking a new question focusing instead on why what happened did happen (rather than why what didn't happen didn't happen) - this kind of question is more likely to get a response in our experience. Hope this helps!