Another day in China, another food scandal. This time the accused is a meat supplier to KFC and McDonald’s in China. An undercover investigation by a Chinese TV station, which aired on Sunday, claimed that a factory in Shanghai owned by Illinois-based OSI Group was shipping the fast-food giants expired meat. Later, coffee-shop chain Starbucks in China and McDonald’s outlets in Japan got dragged into the mess, as they, too, had meat from the suspect factory in their products.

The report sent the U.S. companies into full crisis management. Yum! Brands, which operates KFC, garners more than 40% of its total operating profit from China, while McDonald’s considers the country one of its most important growth markets, so neither can afford tainting their brands with tainted food. KFC and McDonald’s issued apologies to their customers, while suspending shipments from the Shanghai factory. Starbucks said it removed all products with meat from the supplier from its stores. OSI, meanwhile, is undertaking an investigation into the practices at the factory. On Wednesday, Chinese police detained five people in connection with the scandal.

The allegations, if proved true, reveal just how rotten China’s food supply really is. If such shenanigans are taking place at OSI, a supplier with a long history and good reputation, one can only shudder to imagine what’s happening elsewhere in the industry. Yet that raises another question almost as uncomfortable. In a country where companies routinely flout the law and officials — by the government’s own admission — are grossly corrupt, we’re forced to ask why some corporations and people find themselves in Chinese newspaper headlines or investigated by regulators, and not others. In other words, why was OSI the target of a time-consuming TV exposé and not another company?

TIME attempted repeatedly to pose that question to Dragon TV, which aired the investigation, but did not receive a return phone call. The focus on a foreign-owned factory, however, is part of a trend. Foreign companies do seem to figure prominently in state-media critiques and government investigations. The revelations about KFC and McDonald’s are just the latest in a series of attacks on popular foreign brands and established foreign companies in the country.

Since June, Chinese state media have claimed U.S. technology companies such as Microsoft and Yahoo can be used by Washington to spy on China. Earlier this month, Chinese state TV claimed that the Apple iPhone was a threat to national security. Alleged bribery by drugmaker GSK in China has been paraded in national headlines for months. American restaurant brands have been targeted before. Last year, Chinese media accused Starbucks of overcharging Chinese customers, while in 2012, state TV conducted another undercover investigation into McDonald’s, which it claimed exposed unsavory practices at a Beijing outlet.

Obviously, if foreign companies are engaged in illegal or improper practices in China, they must be held accountable. Yet the spotlight shone on the activities of foreign firms is so bright that it can be seen as part of another, more disturbing trend: an effort by the government to undermine foreign brands and business in China.

We can speculate why that might be happening. The government could be trying to reel in a few “big fish” to try to scare smaller fry into better behavior. Officials might be attempting to win points with the public by appearing to address issues of great public concern like food safety without roiling any Chinese interests. And in the process, the Chinese government might believe it can aid Chinese companies in their competition with foreign firms by undercutting the reputation of international brands. The latest exposé on KFC and McDonald’s could have serious repercussions for the American fast-food chains. In 2012, KFC’s business in China suffered badly when news broke that some of its chicken suppliers were pumping excessive antibiotics into their birds.

The Chinese government has a long history of attempting to tilt the local playing field in favor of its own firms. Foreign carmakers, though very successful in China, are still forced to manufacture in the country only through joint ventures with Chinese firms — a restriction most other emerging economies don’t impose. Reports from chambers of commerce accuse Chinese bureaucrats of routinely hampering the expansion of foreign business by taking a “go-slow” approach when issuing mandatory permits and licenses. There is a feeling among foreign businessmen in China that the government regularly discriminates against them. The latest survey conducted by the European Union Chamber of Commerce in China revealed that 55% of the respondents believed that they are treated unfavorably compared with Chinese companies.

The process of opening the China market wider to foreign business has also stalled. More than half of the respondents in the E.U. survey said there had been no opening of the market in their industries over the past one or two years, while 9% believed that the market had become more closed. Such restricted access and other regulatory hurdles cost European companies nearly $29 billion in lost business in 2013, according to the survey. Generally, foreign businessmen feel that China has become a more hostile environment. A similar survey by the American Chamber of Commerce in China found that 41% of its respondents felt less welcome in the country than they had been before.

Such an attitude by China’s government runs counter to the oft-repeated pledges by the most senior Chinese officials that they remain committed to their long-standing policy of opening up to the world. But it is also representative of a more assertive Chinese attitude toward the West in many aspects. Beijing is standing up for what it sees as its rights in various territorial disputes with its neighbors, as it tries to re-establish its traditional political and military dominance in East Asia. After decades of reliance on foreign investment to drive growth and introduce technology, China, now the world’s second largest economy, wants to rely more on its own companies and innovation.

That’s only natural. But at the same time, China, as a developing nation still in need of jobs and technology, can’t afford to chase off foreign investment, either. The fact is that China is becoming a less desirable place to invest, for reasons ranging from the slowing economy to rising costs to ambiguous government regulation. Only one-fifth of the companies queried in the E.U. Chamber survey said China was their top investment destination in 2013, down from one-third just two years ago. Meanwhile, the percentage of respondents who said they intend to expand their current operations in China, dropped sharply to 57% from 86% just last year. Beijing may see benefits in targeting foreign firms, but it should also be aware of the costs.