Why did Japan and China want to close themselves off from European trade?
In Japan, although various daimyo (regional lords) accepted some of the new technologies and certainly the trade from Dutch, English, and Portuguese traders, the Catholic missions to Japan quickly converted hundreds of thousands of Japanese to Christianity. Some of the Christian converts were rebels against Tokugawa Ieyasu, the new shogun who had finally united Japan after 100 years of civil war. An English trader who had become an advisor to the shogun warned that the Catholic missionaries would seek to instate papal rule across all Japan, which indeed they tried to do by stating that the highest authority in Japan was not the shogun or the emperor, but God and God's representative on earth, the pope. Ieyasu and his successors martyred over three hundred thousand Christian converts, then limited trade relations with gaijin (foreigners) to a single port city in the south-east. The guns and cannons which European traders had introduced had played a huge role in deciding the civil war's outcome for Ieyasu, and being able to control those weapons certainly played a part in the shogun's decision to close off trade with the rest of the outside world. For more information, you may want to read Samurai William by Giles Milton, which gives a very in-depth account of European trade in south-east Asia and Japan in the 16th and 17th century.
For China, Europeans were allowed to conduct trade in enclaves, or walled-off portions of trade cities. The imperial ministers had much the same reasons as their counterparts in Japan for restricting foreign trade: religion and technology would disrupt the society and ultimately the government. The Chinese were not entirely isolationist in their trade policy, though; European trade brought new goods and inflows of silver to China, which enriched Chinese culture and society without disturbing it, since cultural (imperial) censorship often dictated which goods could or could not be traded into China.
check Approved by eNotes Editorial