Even years later Vegapunk would still not be able to explain exactly how Kuma Malfunctioned and just why he saved Portgas D. Ace from Akainu. The first anyone knew something was wrong with the Giant warlord was when he suddenly jerked forward and fell on his face.
Because of what was going on at the platform between Fleet Admiral Sengoku and one of the supernova's not many people noticed what had happened. The impact with the ground knocked something loose and all of Kuma's memories came rushing back. Including who he was and just who Monkey D. Luffy was. Some of the marines helped him stand up and asked if he was okay.
He answered in the affirmative but focused his attention on Dragon's son who had just freed his adoptive brother from his shackles. Silently Kuma watched the events unfold until Akainu showed up and had his confrontation with Ace. When Ace was injured by Akainu? Kuma acted. One moment he was across the battlefield from Ace and luffy and the next he was standing behind Akainu.
"If you could go somewhere where would you like to go?"
he asked the startled Admiral as the man turned around to look at him. The question was of course irrelevant as Kuma had already activated his powers and was swinging his hand at Akainu. One moment he was standing there after hurting Ace the next he was gone.
"Kuma what are you doing?!"
Sengoku demanded to know from the ruins of the platform. Kuma ignored him and turned his attention to Ace. He didn't bother asking where the boy would like to go he just hit him with his hand and sent him off. Once Ace was gone Kuma immediately rushed to Luffy and hurriedly sent him off after his brother. The two would end up at the same place together.
"Thank you" Luffy whispered just before he disappeared. Luffy had already picked up his brothers vivra card and was holding onto it tightly. When Luffy disappeared Kuma stood there a moment congratulating himself on a job well done but then it wasn't over was it. He knew that so he decided that since his cover was blown he might as well return to the revolutionary army but before he could do that he had something very important to do.
He took one last look around before disappearing and reappearing next to PX-1 the main control Pacifista for the entire group. He looked the Pacifista in the eye and spoke. "Case Zulu. Target Marines!" he said with a certainty that things were going to get very interesting in the next few minutes. "Kuma what did you just do?" Sentomaru demanded to know.
Again Kuma ignored the marine and smiled coldly. He disappeared. The man stared at where Kuma had just stood and then looked at the Pacifista with growing worry. That worry turned to shock when the Pacifista's attacked. One moment they were fighting the pirates and the next they were attacking the Marines even more fiercely than when they were attacking the Pirates.
Kuma reappeared next to Ivankov and Inazuma. "It is time to go." he said bluntly. Emporio Ivankov smirked at him. Meanwhile Sengoku was cursing Kuma to the very depths of the ocean while he tried to stop the Pacifistas. Whitebeard and his men took the opportunity and escaped. Since Ace was gone there was no reason to stay.
Kuma, Ivankov, and Inazuma all boarded a captured Marine warship and escaped with the Impel Down Prisoners that had come with Ivankov. Buggy and his men took a different marine warship and set off in another direction. The distraction caused by The Pacifistas enabled all of the pirates to escape safely thanks to Kuma.
When Admiral Akainu landed he found himself on a certain island in the new world. He quickly reasoned that he had the moment of surprise and attacked the pirate crew on the island. That was his big mistake. It turned out the pirate crew on the Island was actually Charlotte Linlin alias Big Mom.
Surprise was total and when the battle was over Akainu was dead and so was Big Mom and almost all of her entire crew. In the aftermath of her death rookie pirates attempted to take over her territories only to be squashed by the forces of Yonko Whitebeard, Kaido, And Shanks.
Blackbeard who had just freed all of the Level Six prisoners of Impel Down reappeared at Marineford only to find Whitebeard gone and the Marines starting to clean up after the aborted battle with the Yonko. Because he had shown up with Impel Down prisoners and news had just arrived at Marineford about the events that had occurred at Impel Down.
He was immediately attacked and he and his crew were quickly killed by the angry Marines who wanted blood for all the things that had gone wrong that day and Marshal D. Teach was an available target as well as his entire crew. Shanks had intercepted Whitebeard's retreating fleet and joined them when he learned of the events surrounding Kuma's mysterious actions.
As for Monkey D. Luffy and his brother Portgas D. Ace they wound up landing back in Amazon Lily. Where Releigh eventually found them being cared for by the Amazons and the rest as they say is history.