Let me share my reading of the situation.
The scenario in which Pakistan exists today, China would be happy to provide Pakistan one of its best tech even if it had to offer that for free. (I know nothing has come free neither it will but that was just to highlight importance of Pakistan to the interest of China.)
I am recalling in 1980s, China had given Pakistan enriched uranium which was enough to produce few nuclear bombs if we needed then. Now this is something which is unique example in the world and no country has offered its bordering country a nuclear weapon, no matter how friendly and important it is. If you are able to find a reason why China did so, you will be comfortable in finding why would Pakistan receive future "gifts" and all those at "soft loans".
These 50 JFTs are tip of the iceberg if you compare how much China has supported us already. Well we cannot thank them enough for what they have been to Pakistan.
And its not going to stop at 50 JFTs.. Niamatullah wali has written that Pakistan will undergo military pact with a country in its north and we are standing on the edge where we may find that happening.