Because Indians (elite/upper caste) assume that their GENETICALLY SUPERIOR to any Chinese plain and simple. The Indians don't talk of superiority over any other white caucasoid races since they think and feel they're of the same kin hence a sense of fraternity/brotherhood/kinship of high intellect, and high martial prowess. That's where the misplaced confidence come from along with the sneering attitude towards any success China achieves with accusations of debt trap, Chinese stealing tech, genocide, China collapse theory that's embedded in the psyche of these group of Indians.
If the Indians don't think that way then they wouldn't look down on China/Chinese and treat China as if it's their perpetual enemy to be despised, ridicule, and feared at the same time.
As a point, I don't think Chinese is in anyway at all GENETICALLY SUPERIOR OR INFERIOR TO ANY ETHNIC GROUPS IN THE WORLD. That sort of thinking is IDIOTIC, FASCISTIC, AND MOST ESPECIALLY COMICALLY RACIST. Chinese people need to excel is borne out of our struggle and continued survival in spite of the deluge of struggles, upheavals, and hostilities from countries where we're forced to be placed into; given the promised of riches and to find a place of peace, serenity, and solace away from the land turned upside down due to China's internal rot as well as external factors that upended then existing order. Wherever Chinese people go we find ways to adapt and thrive to the point of being envied, hated, and still be treated as outsiders to the countries if residence as perpetual outsiders or not Canadian, Australian, American enough. I don't want to belittle and disregard the hostilities, and horrible sufferings Indians suffered at the hands of their colonizers doing so is despicable beyond human reasoning. But it's also one of the most perplexing conundrum I don't understand from Indians. They should be more understanding and respectful as to what animates current China's recalcitrant approach with respect to it's legal and historical rights regarding the border issue, the South China Sea situation along with the ongoing geopolitical contest between China and U.S. along with her vassals.