Well, there is risks to every market. Many foreign companies were also outraged by china forcing them into jvs and transfer technology. But they still did it. In the end of the day, they are going to be India. They are doing ckd to save on tariffs. If it works out that they make less money this way, then they will go back to selling directly into India.
There is risk, certainly, but at the minimum there should be return on investment for somebody after all these years. But we see the same thing happen year after year, with Walmart, Amazon, etc. doing their best to crack into the Indian market only to get butchered and nothing to show for all the effort.
The reason that foreign companies are willing to invest in China is because despite the "forced tech transfers" and "political kowtowing", at the end of the day, they make killer profits they can't make anywhere else in the world. In India they are lucky to even get the ROI.