They are not. The languages must have come first / evolved independent of China, and then a wave of foreign commerce / scholarly / government influence over centuries propagated Chinese writing to them.
So the spoken language uses Chinese based characters to record the sounds in writing, but it may not necessarily have relation to what the sounds are in Chinese if someone were to read the characters as if Chinese. And the spoken language is not at all related to Chinese (aside from some imported words). As if someone encountered English alphabet words being spoken with totally different sounds assigned to them.
That was very interesting to finally understand -- if I've even gotten it all correct...