All these moves are designed to gauge and test the limits of Chinese government and also in some sense a practice run/example to the western countries considering to enact such measures against Chinese companies in their respective regions. India wants to show its leadership, bold courageous "supapowah" leadership in this manner that it too has power and the wherewithal to confront Chinese Commie aggressions despite most of its materials and intellectual resources needed to further develop their economic aspirations would come from China.
India is indeed a very dangerous country since it already plays like an ascended power that's on par and with cultural affinity and aspirations with the west that colonized, shaped, and built what is India. I agree wholesale with
@ChongqingHotPot92 that China/PLA better not drop their ball when it comes to the government of India because in my view, it'll stab China when it's most opportune for them.