In 2002, Finch (Michael Emerson) communicates with the Machine throughout the use of surveillance cameras and uses his phone as way to find him, which the Machine easily does. In 2003, Finch decides to test the abilities of the Machine by using it in a Blackjack game. While initially failing, the Machine manages to get him win many times but he decides to lose the money at the last second, considering it's wrong. Later, while walking off, the Machine texts him "Stay" multiple times just as he was going to be hit by a car. He confronts the Machine, stating that the purpose is to help people, not him.
The episode periodically flashes back to 2003, where Finch is in a park playing chess with the Machine, and using the games as analogies to various concepts he teaches it. Several games later, as the Machine is appearing triumphant on many occasions, Finch tells it that he doesn't enjoy chess since it was created during a time of cynicism and societal imbalance. Finch believes people should not be assigned "values" and sacrificed; those who treat life as game of chess deserve to lose.
The Machine has scruples about killing because Finch went to a lot of trouble to teach it scruples about killing and specifically that it exists to save humans at every opportunity and never sacrifice them for some kind of advantage.