Believe me, Japan is not stupid.
China's market single handedly pulled Japan out of a 2 decade long economic slump, with a huge trade surplus of over $20 billion USD per year. (Same with S Korea)
You think Japan is on the bad end of the deal? They must be doing something right to make $20+ billion from China a year.
Regarding this car - the only difference now is that it's sold under a different brand than Mazda. Mazda already got newer and better cars in this segment, so why would they care if the contract is not renewed? FAW still would need Mazda assistance in parts, technology, etc. so Mazda is not losing much, if any.