It was British logic, picked up and spread assiduously by them after 1857, when their Bengal Army very largely mutinied. It was only after that that they started promoting this martial races idea, after having defeated the Marathas under Scindia, the Sikhs in the three Anglo-Sikh Wars, and the Gorkhas with these same Purbiya soldiers.
You should really read the memoirs of Agha H Amin, who says, in one of his articles, “Harbaksh Singh, unlike Pakistani Historians like Shaukat Riza, doesn’t go to such lengths to distort history by claiming virtue of belonging to some superior race”.
The Pakistani establishment is keen on proving they can dominate their “less martial”, “Hindu” neighbor. These are confirmed in United States research documents as well. If you read books from Gulzar Ahmed, or many of their state sponsored historians, or even DGISPR they talk about Hindu/Muslim racial theory many times, write about Indian soldiers getting “massacared” in battle, running away from posts constantly, while I have not observers such statements in Harbkash Singh nor the Official War Histories written by MoD themselves.
That is a personal failing, not an ideology.
It has to be an ideology. Pakistan fights a proxy war in Kashmir, yet India doesn’t retaliate. China fortifies along the LaC, no reaction. It’s a defensive mindset that hinders a lot.