European Imperialism came in and utterly destroyed traditional governmental structures- India is still carrying the structural dysfunction of British Imperialism.
In contrast China was Never fully taken over by western imperialists- it was hugely traumatised but over the 20th century China regained its sovereignty and reconfigured itself in a manner capable of Responding to western Imperialism. Yes that reconfiguration involved some massive internal conflict such as the Cultural Revolution but since then China is now capable and demonstrating it has a level of sovereignty no other nation has enjoyed post western imperialism. China is now building an empire of its own with Russia and Iran and N.Korea already subservient tribute states to it. Chinas current growth rates of close to 5% are still the envy of all western democracies and India. China has won the trade and logistics war- there is no nation on earth that can afford not to trade with China without losing significant economic advantage.
India is still stuck in the dysfunctional state that imperialism deliberately placed it.