They see that Russia is imploding, and they are probably pretty sure that they won’t be invaded by the Russians anytime soon, given the circumstances, even if their border checkpoints cause Russia some logistical problems by delaying military supplies.
Given the region, it’s probably not more complex than Kazakhstan’s leaders using the moment to get something out of Russia in return for letting the Chinese military stuff through again. Either that, or China has no problem/encourages this, helping Russia’s descent into its impending implosion - all while appearing to provide support. A weak Russia with problems can only greatly benefit China in a myriad of ways in the long run. And in the short run they can continue raping Russia by insisting on cheaper crude oil exports as Russia’s cash poor self can’t protest.
Then again, it may just be the same old story: when a bully has victimized someone over a long period of time - and that victim now has the opportunity to obtain a measure of revenge against the bully - they will.