She wakes up in a place that is apparently empty of life after who knows how long, trapped in a small space with no one to explain what’s going on. She sits in silence for a moment before framents of memories start coming back and she remembers experiments. It’s confusing but then she discovers another sign of life, someone else who is trapped in this same facility. The best thing to do is contact this person and become companions at least, or help guide them to what is supposed to be the end. GLaDOS speaks and she has a purpose again.
GLaDOS sees Chell not just as an experiment but as a way of reconnecting to the past, a time before when she was important. Reawakening Chell has reinvigorated GLaDOS and given her a purpose, or in a way made her feel relevant, even if no one else is about to really observe it. She is doing what she has been designed to do, even if there have been some mistakes through faulty programming, she ignores them in order to complete her function executed.
Execution here doesn’t mean GLaDOS going through her functions, but instead where she allegedly executes people for some reason. As you play Portal you’re focused on completing the puzzles that the question of why you’re being put through them isn’t necessarily at the forefront of your mind.
Why is GLaDOS making Chell jump through these hoops in increasingly dangerous and life threatening situations? Sure, part of it is programming but there is the dark side to the machine too. GLaDOS is an advanced AI who is constantly learning and has come to a point in her life where the intelligence is incredibly human like, with the ability to joke and to lie.
However, she had to be taught these things at one point by humans and as she learned maybe GLaDOS learnt what humans were like, discovering that she didn’t like what she observed. She can see a lot of the facility and as she observed, she would have seen and maybe experienced the darker side of humanity where people would lie to each other and step on each other to get ahead.
GLaDOS does what anyone would do when they saw what could be perceived as a problem, and that is try and fix it. Since GLaDOS doesn’t have the power to manipulate human DNA to fix it so everyone is ‘better’, she believes the only way to fix the problem is to get rid of the humans. It may not be the perfect solution but in GLaDOS’ artificial mind it is the most logical course of action. She could have just killed the humans instantly but she had learnt the negative side of human behaviour and toyed with them, making them run through her maze, lying to them to get them commit certain acts and then finally murdering them.
The existence of Chell is something GLaDOS can’t allow to continue, especially since the killing of humans has become one of her own prime directive, and one of the things she thought of on her own to do. GLaDOS wants to see her own idea succeed, just like anyone else would want to. However, Chell is a tougher match for GLaDOS and it is something she isn’t prepared for.
As far as we know GLaDOS has had a 100% success rate when carrying out her new function, but Chell’s rebellion is a new test for GLaDOS and a scenario she hasn’t prepared for because she doesn’t have the data to help predict Chell’s movements. GLaDOS continues to try to use her old techniques, like lying, over and over because that is all she can do.
In this regard, GLaDOS, who is seen as an omniscient being, is exposed for the infant she really is, lacking the experience needed to plan for the long term. Chell takes advantage of that inexperience and does things GLaDOS cannot anticipate, because, for all the similarity to the human mind, she has she cannot truly think like a person.
When Chell makes it to GLaDOS’ lair, GLaDOS drops all pretence and acts much more like a machine like with the sole function to kill that she is, as rocket after rocket is aimed at the test she failed. Eventually GLaDOS is defeated by the one thing she thought needed to be destroyed, the human Chell. Ironic when Chell is most likely thought the same of GLaDOS.
GLaDOS is an interesting character because she isn’t necessarily a villain, but someone who learned and mimicked behaviour that she was taught and observed.