There are countless other quotes of guards and prisoners saying they were "just acting". But isn't that equally as powerful? I'm not sure it matters so much why you're locking someone in a closet for 6 hours (just acting, wanting the experiment to succeed, wanting to please your teacher, having sadistic tendencies, etc.), it's that you followed through and performed that action. The fact that you did something you wouldn't normally do might be even more significant. It's one thing if the guards and prisoners all know they're acting, but that doesn't appear to be the case. It sounds as if individuals were acting on their own accord, but unaware what behaviors and instructions were real vs. not real.
Even in real life, how many people in the hierarchy of a dictatorship are "just trying to please" the dictator vs. really "buying in" to the philosophy? I guess it matters in terms of trying to change the system in the future, but it doesn't matter that much in evaluating the harm done to the powerless in the past.
I don't think power always veers towards dangerous dominant/submissive behavior, but history seems to have an amply supply of evidence that that certainly can be the case, regardless of why it gets there.