True, it will have a higher chance of hitting better if fired from gilgit area, but, what are the targets gonna be ! Beijing, Shanghai, Hong Kong. Other province head cities, all near to the sea. Plus, pla already has a system to intercept land based missiles, based on the hq series. But the same can't be said about the long, hugely long shoreline.
Plus, nuke boomers are going on a suicidal attack in this hypothetical scenario. They are gonna have a lot of choices compared to land based or air launched nukes. They won't get past the sam network.
Talking about why will it attack ? It's a matter of certainty that Pakistan works for Pakistan and China works for China in the Chinese Pakistani relationship, state to state.
Chinese are soon gonna run Pakistan. Wait and see.