GERTY's desire to protect Sam was one of the more refreshing aspects of the film for me. The equivalent in 2001, HAL, is driven insane by the conflict between its design (to process information accurately without distortion or concealment) and its orders to keep the discovery of the Monolith secret from the crew he was supposed to protect. The resulting errors forced HAL to attempt to eliminate the crew so that it would not have to lie any longer and would thus be able to reconcile both parts of its programming. Here, GERTY also has two conflicting sets of programming. One says that it must keep (the current) Sam happy, healthy and safe. The other says that it must keep the mining operation going and must also keep the nature of Sam's existence a secret from Sam. When the younger Sam brings back the older Sam, GERTY now has two charges to protect. My guess is that having two Sams disrupts the balance between the two contradictory sets of programming and shifts it towards protecting them.