Why was China unable to assimilate the Vietnamese despite direct rule for almost a millennium?
It is incorrect to state that China was unable to assimilate the Vietnamese. Vietnam gained autonomy in 939CE following a rebellion from Chinese rule that had lasted roughly a millennium from 111BCE, with brief periods of independence in between. Vietnam then went on to have several wars and conflicts with several Chinese dynasties over the following thousand years that led to eventual border changes that continue to exist today.