Buddhism is now an inseparable part of Chinese culture. However, this was not always the case. As the passage mentions, Buddhism was introduced to China, and this gave rise to a complicated relationship between Chinese people and Buddhism.
Buddhism was seen as an "unwanted foreign influence" for two reasons. First, Buddhism was considered "foreign" because it came from Northern India, where Siddhartha Gautama was originally born. His ideas spread because of relocation and diffusion. Another reason why Buddhism was seen as an unwanted foreign influence was because Buddhism was promoted during the Yuan dynasty by Mongol rulers. Therefore, it was associated with the rule of foreigners, and not the rule by Han Chinese.