The CIA (and every other intelligence org.) is literally a weapon designed to operate in the grey area to fit the mandate of the policy makers and elected leadership. Many of the things they do are questionable or worse. In the case of the DoD, they do these things at the behest of democratically elected leadership.
Of course US and China will operate in their own best interests. Of course they will both play chess, both name call, both sanction and impede. When it's not a hot war, it is still a never-ending battle for each country's total economic, soft, and hard power market share.
This is every country.
It's geopolitics.