On their end China insisted on joint ventures and technology transfer to the extent Western companies would comply. Western companies were reluctant to give up their best tech so China ended up with last generate tech which, still, was way better than it had. This was a status quo that benefited both sides enough that it worked well enough for 20 to 30 years.
Now the stakes are getting higher. China wants to level up by buying foreign tech companies with, essentially, state capital and the West naturally doesn't see that to be in their interests and so they block those purchases.
The West wants to enter China with their latest internet block busters and China doesn't see that in their interests and so they block that but, more often in a soft way. They open the door, allow foreign companies to enter and train locals in the technology and then slam the door when they gain traction.
Both sides are well aware of the stakes and the situation what's evolving are the techniques and strategies of the competitors. It's a big boy's game for large nation states and if you're not that big you're likely to take some bruises. If you're a fan of raw capitalism though pull up a chair and a beer and watch the game.