Almost all mines and oil fields in Kazakhstan are developed by foreign companies (AFAIK mostly western ones). And it's not like they bring us western values, they are known to exploit local workers, to put their people in high positions instead of locals, to bribe corrupted officials, etc. It's simple: they have power, they could invade our country and we can do nothing about it. So we let them to drain our national wealth for a temporary truce. I don't see why this is any different with China and Europe. US or Russia is a respectable force for China, but Europe - not so much, so China will monetize its power and it'll buy your factories and ports if it can push it (and China has a lot of power to push).