It happened to Samsung before this, when it moved all of its smartphone production out of China in 2019, mainly to Vietnam and India. Samsung had its market share in China drop from 20% in 2013 to around 1% today. Apple is the next smartphone company who made the serious push to move its production and supply chains out from China. Namely to India, and Vietnam. Even more provocative was Apple's push to have India replace China as Apple's main manufacturing center. Because both the US and India are the most active nations in trying to sabotage China's economy.
So imagine one day where Apple makes its iPhones mainly in India, and then sells them in China. This, after unnecessarily dismantling its manufacturing center in China that was running so well. The made-in-India iPhones will be more expensive, lower quality, scarcer, and worse, it makes a mockery of China's relationship with Apple. So why should any Chinese put up with this nonsense? Giving business to people who are seeking to undermine China. Its Apple who unnecessarily provoked this, so they should feel the heat. Since India is more important to Apple than China, they should go and sell more iPhones there, and forget about Chinese business. The Chinese will have full justification to support their local smartphone brands over those untrustworthy and ungrateful foreign brands.
But China is moving on already. It is no longer just a cheap factory and big market for Apple and Samsung. It is becoming serious competition to them.
In addition to the other points brought up by
@zbb, there are a few other things to note
1. Samsung's
worldwide marketshare has actually been declining since that time. It's not really related to the production/patriotism, but rather much stronger competition arising from China from Oppo, Vivo, Xiaomi, Huawei, etc.
2. A lot of Chinese companies are relocating certain manufacturing to Vietnam, it is not necessarily related to Apple. It is becoming increasingly difficult to recruit workers in China. Plus they want to take advantage of the VN government incentives to set up shop. Luxshare (Chinese company) is a expanding big in Vietnam, but it is also expanding in China too. BYD also is growing in Vietnam.
3. Brands really should not succeed or fail based on "gratefulness"/nationalism. IMO, this is why Chinese companies are seeing more worldwide success now. They were not treated with kid gloves even at home. For years Xiaomi was just seen as some Apple copycat, but once they grew confident to produce much more original ideas and designs, their business grew. You cannot just copy Apple, you must be better. Another example, Toyota, despite all the animosity towards Japan, was still a leader in China because their products were better. Things have changed now.
The smartphone business in China is quite saturated at this point. Even a Chinese company, Transsion, mainly does business outside China. They have a plant in Ethiopia. ZTE also opened a plant in Africa in Zambia. For Apple, they are looking at future growth in India and SEA. These are countries trying to grow their middle and upper classes. Apple is not "dismantling" anything, this is false, they are just expanding outside and going along with Chinese companies who are also expanding their business. The US media wants to make the US sound like the leaders, but really they are not. That's why most of their "friendshoring" efforts are either failures or actually just making use of Chinese plans (which is what is happening here).
I don't think Apple or any other successful company has any illusions about India. After all the corruption, foreign company failures, arrests, etc. that they think they will open a factory and replace Chinese production even within 10 years? I don't think Tim Cook or any other Apple executive would be so foolish. However, it's basically anteing up in poker, only way you get to play.