The testers can’t just out right tell the people what is happening before the test actually took place, it would ruin the entire test.
I’m sure if there were a test today that was seeking a particular result you would have no way of knowing, though this was extreme, they at least told them afterward the person was an actor and they weren’t really shocking them.
To get particular results in a test, you can’t always know every detail involved behind the scenes. I completely understand the need for deception. And no one was physically harmed.
@peyton good link, the one I gave talks about that one as well as many other bizarre experiments done by soviets and others.