In other words, while the experiment appeared to demonstrate interesting things, those conclusions are based on the specifics of the experimental setup and it would be better to study more representative environments to draw useful conclusions.
From the above discussion: "The Stanford Prison Experiment is frequently cited as an example of unethical research. The experiment could not be replicated by researchers today because it fails to meet the standards established by numerous ethical codes, including the Ethics Code of the American Psychological Association."
And the APA ethics code: https://www.apa.org/ethics/code
"Psychologists strive to benefit those with whom they work and take care to do no harm"
"8.07 Deception in Research (a) Psychologists do not conduct a study involving deception unless they have determined that the use of deceptive techniques is justified by the study's significant prospective scientific, educational, or applied value and that effective nondeceptive alternative procedures are not feasible.
(b) Psychologists do not deceive prospective participants about research that is reasonably expected to cause physical pain or severe emotional distress."