Before we look at Finn’s heroism, we have to understand why his actions are so heroic.
The First Order, and the Galactic Empire before it, are basically space Nazis. Like real Nazis, the villains in The Force Awakens use everything we know about social psychology to create an organization that is built on following orders and making it easy to hurt others.
How does The First Order do this? By manipulating one of the most basic human desires — our need to fit in. In the classic Stanley Milgram experiment on obedience to authority (and a recent follow up), most everyday Americans followed orders even if it meant hurting someone else. Like the Nazis during the Nuremberg trials, Americans in this experiment didn’t feel responsible for their actions because they were “just doing what they were told”. The stronger the authority, and the less interaction there is with the victim, the more likely we are to follow commands that harm someone else. The First Order carries out a strong obedience to authority through Captain Phasma, the woman who commands all stormtroopers.
The First Order combines obedience with conformity and anonymity. This is very dangerous and “greases the slippery slope of evil” according to psychologist Phillip Zimbardo. When we’re in unfamiliar situations, we look to others to see what to do. Again, we want to fit in. If everyone is doing something that’s wrong, it becomes extremely difficult to do what’s right. People are also more likely to kill, torture, or mutilate if they feel anonymous. Stormtrooper armor makes conformity easy and eliminates anything that could identify who's wearing the helmet.
This is what you need to remember — people aren't born good or evil, everyone is capable of doing good and evil. Situations can pull us in one direction or another.
Finn and the Psychology of Heroism