Chinese help for Pakistan Railway worries India

Yeah. But thats only one aspect of it. There are economic benefits aswell. Google it if you are so capable.
Its worth its weight in gold for all parties.... Pakistan DID NOT jsut think about exctracting only the single benefit.

Pakistan has not extracted full benefit yet for multiple reasons.
1. The port just opened a year or two ago.
2. The infrastructure is still being developed in that area. For example, we still need a rail tracks connecting Gawadar to the north.
3. There is a general down turn in economic activity in Pakistan.
4. The law and order situation doesnt permit full benefits of the project. For one thing, Afghanistan which would through the port have quickest access to the gulf through Gawadar is wreck currently. China has to be connected through Balochistan, which is also a wreck.
5. The global down turn has meant that trade is also down, so this a concern for developed ports around the world, Dubai for example has seen a huge down turn. So if a huge developed port city like Dubai is feeling the heat, imagine what its like for a port like Gawadar which is only just beginning!

As for alliances and what the mean, thats a moot point. Alliances dont mean you give things for free. And they dont always work to your advantage.
America has had to deal with the unreliable allies for years. But alliances such as these do pay dividends in the long run.