After reading One Piece Chapter 1098, I think I know the reason why Kuma chose to become a tool for the World government.
We all know that Kuma will do anything to save Bonney’s life. I think Kuma realized that he would need the power and technology of the World government. Therefore, he decided to become a tool of the World government in exchange for treating Bonney’s disease.
I believe that Vegapunk was the only person who had technology advanced enough to help cure Bonney. That would also explain why Bonney was on Egghead before, she was getting treatment for her disease.
Kuma made a deal with the World government to give his body and be used and a tool of science in exchange for curing Bonney’s incurable disease. I also feel like Dragon was the one to possibly reach out to Vegapunk in secret or told Kuma about Vegapunk and his technology.
I think the reason Vegapunk was terrified of Bonney learning the truth of Kuma’s past, might have to do with the fact Kuma lied to Bonney about her being cured at 10 years old. The last thing Kuma wanted is for Bonney to learn she’s the reason he became a mindless tool for the government.
One last thing, I also think the other reason Kuma didn’t want Bonney ever seeing his memories is because he didn’t want Bonney to find out her mother was forced to marry a Celestial Dragon and that Kuma isn’t her “real” father.