Up till recently, China was nowhere near American aid. Infact, most of Cpec is not aid but investment and loans(nothing wrong with it though).
I think its unfair when you expect China to invest in Pakistan in the 80s - early 2000s when China is just a poor country. In the 2010 onwards, China qualify as rich and we have enough national reserves. Its no coincidence China started using the wealth the help others nearby. As for the so called investment, we are taking a big risk on Pakistan when security and economy situation in Pakistan is not so good. This risk is bent on helping Pakistan and regional area to restore peace and development. There is no gurantee return. Especially its such a big sum. Ask yourself, why nobody come to Pakistan to invest so much if opportunity is good? We are doing you a favour based on friendship by taking risk on our side.