the fact it was stated he can remove his memories without forgetting them also the arc began with lilith saying that she can't remove someone's true nature with the shark which was foreshadowing for kuma doing the same thing the shark did and go against his programming
You realize this may have been put there by Oda so we only understand why Kuma doesn't lose his memories the moment he extracts them, right?
Kuma first made the memory bubble, then he kept his memories, and finally, his memories were wiped.
Saturn oversaw everything that Vegapunk did, he's also a scientist. If Kuma's memories are still in Kuma, it would be a much worse decision by Oda than the opposite.
The memory bubble that was in Egghead was the only trace left of Kuma's memories, however it was popped by Bonney after she saw his memories.
There is no Kuma anymore, he lives in Bonney now.
That's the perfect conclusion to his character.