We cannot enter into alliances until we are acquainted with the designs of our neighbors: Sun Tzu, The Art of War
A little history
Chabahar and Gwadar are two ports separated by just 72 kilometers, but worlds away in terms of geo-strategy. But let us go back a few decades when India and Pakistan won independence from Great Britain. In the immediate aftermath, Pakistan grabbed a large slice of western Kashmir from India. Three wars were fought between these two countries where India got the upper hand including the liberation of East Pakistan, now Bangladesh. This left a deep distrust and a desire for revenge in the Pakistani psyche. In 1962, India and China went to war over disputed borders in Ladakh and Arunachal Pradesh. China got the upper hand.
The Old Order Changeth
From the 90s, improved economic policies and the desire to do better saw an explosion in the economies and living standards of the citizens of China and India. And with an improved economy and living standards, came the desire for more, hence the need to look for more resources, including energy resources (read oil), raw materials and safe shipping lanes to get these resources to the homeland.