Robotnik’s research was being funded by the United Federation (the Sonic equivalent of the United States). It was initially conceived as a means to create a living weapon, though Robotnik’s personal motivation was to save Maria. During his research, Robotnik created two immortal beings: Shadow, and a giant reptilian prototype called the Biolizard. Unlike Shadow, the Biolizard was violent and uncontrollable, and once the United Federation caught wind of it, the decision was made to shut down the project and eliminate anyone who knew of it. A squad of G.U.N. (Guardian Unit of Nations) soldiers were deployed onto the station, arresting Robotnik, killing researchers, and evacuating civilians. However, one civilian was caught in the crossfire: Maria.
Different versions of Shadow’s story across the games and extended universe depict Maria’s death differently. The 2005 game Shadow the Hedgehog shows a G.U.N. soldier shoot her in cold blood, while the Sonic X anime shows him kill her when she refuses to comply with his orders. What was she doing that they found so objectionable? She was sending Shadow to Earth in order to save him from the slaughter.
With her dying breath, she asks Shadow to bring hope to humanity as he is sent down to Earth on an escape pod. You’d think that wish would have led to Shadow saving the world rather than attempting to destroy it. So what happened?
As is revealed throughout Sonic Adventure 2, Robotnik went mad after the loss of Maria and his research. Even while imprisoned by G.U.N. and continuing his work under heavier supervision, the doctor began planning his revenge. If he couldn’t save Maria, he would destroy the humans who took everything away from him. This included brainwashing Shadow to forget Maria’s dying wish, instead having him misremember it as her asking him for revenge.
Shadow was eventually captured by G.U.N. and put into stasis, where he would remain for 50 years. Finally awoken by Eggman all those years later, he manipulated the doctor into bringing all seven Chaos Emeralds to the remnants of Space Colony Ark, claiming he wanted to use the stones’ energy to power the station’s powerful Eclipse Cannon and threaten the people of Earth into submission. But in truth, his plan was to use the emeralds to put the station on a collision course with the planet, destroying it and all of humanity.
Shadow nearly succeeded, too, before being reminded of Maria’s true dying wish by Sonic’s not-girlfriend Amy Rose. He then joined the rest of our heroes in stopping the Ark’s descent by using the Chaos Emeralds to defeat the Biolizard who was sprung from its imprisonment in the depths of the station. Then, having used all his power to stabilize the Ark, he fell to Earth. The rest of our heroes mourned him, but celebrated that he was able to carry out Maria’s wish.