It does not seem random, the kaiju chose him but why?
There is no official confirmation on why Kaiju chose Kafka but there are theories.
The first theory is that there are two types of Kaiju: good and evil. The good Kaiju want to help humans and coexist with them, while the evil Kaiju, like Nine, want to be the dominant species. The dragonfly Kaiju is one of the good Kaiju and it chose Kafka because it sensed he was weak and wouldn’t be able to fight back. However, the Kaiju doesn’t actually want to control Kafka’s body.
The second theory is that Kafka is a hybrid, a mix of human and Kaiju DNA. This has not been explicitly shown in the anime yet, but it would explain why the dragonfly Kaiju seems to be learning and growing alongside Kafka. The Kaiju is possibly influencing Kafka’s behavior, such as the time when Kafka attacked Nine in a way he never had before.
The third theory is that the dragonfly Kaiju was originally inside a samurai who fought Kaiju in the Do period. This samurai somehow defeated the Kaiju and possibly used its power, similar to how Kafka did when he punched Kaiju number 10 out of the sky. When the samurai died, the Kaiju left his body and searched for a new host. It chose Kafka because he reminded the Kaiju of the samurai.
However, in the end, these are just theories not actual facts. Only the author of the manga knows what the truth really is.