Japan and China attempted to restrict Christian missionaries, symbols, and books from entering their territory. Did they realize that this could be the spearhead of European aggression?
Well, European colonialism lasts for roughly 500 years and spans the globe. The short answer to your question is...its just a pattern. But, the Why can be better understood through the Where and When. I'll briefly explain how European colonialism evolved, then explain how missionary goals differed from the State goals in a new colony. My answer will focus or draw mostly on the experience of the Canadian state and its precursors, which will involve comparisons to other North American states.
European colonial expansion lasts from the 1490s and the Spanish conquests of the Aztec and Inca and lasts until roughly 1776, when Independence movements based on the enlightenment take hold in most Sovereign states of the America's. Conversions of Indigenous groups began immediately on contact. The result throughout Canada and The USA was, by about 1650 CE, a mix of traditional and Christian beliefs. For the Northeastern Indigenous belief system, the idea of a monotheistic creator God was easily compatible with their traditional belief system but the Christian afterlife posed some theological issues for new converts.
At this time, the Church based in Rome was not overly interested in the souls of the heathens of a world far away, and many metropolitan Europeans didn't see this as a big threat to religious survival as the more pressing issues of the Reformation in Europe. Missionaries tended to exaggerate their work abroad to better get the attention of the public and those with money to spend on missionary charity. Colonial offices were not overly concerned with the spiritual beliefs of First Nations and Indigenous peoples. Samuel du Champlain and his missionaries had different goals in New France. He and the Compagnie of 100 associates wanted riches and fur to justify their expeditions and the colony to France, while the missionaries wanted to waste resources on mass conversions. They didn't always align on how to proceed with relations with the First Nations. Were they just a trading partner or an equal nation of people who's souls needed to be saved? Further, was it okay to take their land and resources if they had already converted and 'accepted Christ'? So the tension between how Christian Nations should interact, what constitutes a Christian nation and what are the goals of the evangelical group don't always mix.
This becomes a key reason for the US revolution, as by the mid 1700s both Britain and France had sought to reduce colonial expansion to coastal settlements and acknowledge much of North America as a "different nation". American revolutionaries didn't want a lot of restrictions and moral hangups about taking land, so race instead of religion mattered more in how the US subjugated and dealt with its..."Indian problem", and most post-colonial states in the Americas would follow suit with making genocide a matter of race and "civil superiority" and not just religion.
Update. My links aren't working and my sources will come in the morning EST.