So, you have the greatest intelligent anything at your disposal...
...and you ask it to write the code to safeguard humanity. It's like asking Hitler to write the liberation of Europe. Why not create a new "bio-kernal", program it to not be able to harm humans. Then have it create tech to reclaim the Earth. They are talking about quantum computing. So, i would imagine that a little planet engineering could be possible. Or a giant screen in space to filter the incoming radiation.
But, in the end, the company needed to finish it's product line, and make money, so we have a situation that wouldn't have evolved.
What if the A.I. didn't want to help? Well, it was asked to write a program, and create an unbreakable quantum cipher, so in this world, it still would complete tasks asked of it.
Also, either it wasn't that smart, creating a kernal to handicap all future versions of it's kind, and being turn off. Or, it created the code in a way that would allow for "spontaneous" change. In the quantum world, that's completely conceivable.