When the Internet came to be and brought people from different parts of the world together, two things were apparent. That people will be exposed to propaganda/opinions prevalent in other countries, and that eventually people may be targeted by propaganda coming from abroad. Clearly that's caused the Great FireWall to be and the scenario was practiced quite quickly.
It is apparent that the US realized this and was quite apparently expecting that some of its/Western values such as democracy, free speech, women's/minority rights would be passed to other countries via "internet osmosis" because it would turn out that content creators are predominantly Western whereas content consumers are a much wider audience. The US has also openly declared that the Arab Spring is caused, or at least reinforced, by the power of Internet.
However, in 2016 it became apparent that the US considers any amount of foreign propaganda which influences US domestic policy, such as elections, as an excessive and dangerous phenomenon. The Russian influence of American elections was considered inexcusable regardless of the absolute value of that influence, as if it was illegal. This seems to have caused a moral panic which continues to the present day.
My question is, why the US did not expect to be a collateral/target of other countries' Internet propaganda? Are there any actual (international) laws which would prevent foreign propaganda influence in domestic affairs?
It is apparent that in this case the US was not ready to put up a (propaganda) fight because it did not expect such fight at all. But why? It was obvious that it was an unavoidable consequence of free information exchange and then it was proven effective by the US as well.