Indeed. Pakistan has 7 times smaller population and just one Indian state - Utter Pradesh has equivalent population to Pakistan. Where you have 26 [?] states we only have 4/5. Where you have dozens of ethnic groups, huge religious diversity we only have 4/5 ethnic groups with almost 96% Muslim majority. Furthermore nearly all of Pakistan's population lives withinn the Indus region whereas India has many geographic regions.
Yet we are always in state of chaos. Many people blame the army but that is not true. Military rule was symptom of underlying issues rather than the cause. The real reason why we have problems despite being homogenous compared to India is simple. It lies in the formative years.
At the outset in 1947 the indian state prepared the compact between the peoples it ruled. That compact was then written down in what you call the constitution. It was the template that you all agreed to live by. Those were the rules of the gane everybody agreed to with your courts acting as the umpires. And that is how you have lived since. That compact was flexible, loose enough to make all citizens in India feel included.
In Pakistan no such thing happened. We got our constitution in 1973. Think about that. You got yours in 1949. After 1947 our state did not prepare a compact to include all it's citizens but tried instead of to prepare a manifest by which it could prolong it's rule over the citizens and secure economic privilages. A minority created a system by which they could appropriate the state. To do so religion was used. When you were instituting your constitution in 1949 in Pakistan our leadership was giving sovereignty to Allah via the Objectives Resolution in 1949 which was fraud. It amounted to illigitimate rule by saying power belongs to Allah and I as appointed agent of Allah will rule you. It was cheap grab of power using Allah as a cloak.
For practical purposes the leadership relied on bureaucracy and the military to run the country. As we move forward the army thought "hey we can rule this country better then them" and they took over. Thus to this day there is no functioning compact but just recipes convenient at the time to garner few years of rule.
However I would say that Modi is in danger of unsettling the compact you have secured over the previus decades.