Quite Simple Mike...
What is going on here is a variation of the light-sensitive burglar alarms you see in banks, museums and other places.
When your body part "breaks" or disconnects the light beam, that,in turn, throws or disconnects a switch that automatically re-opens the elevator doors.
A very crude version of this is your garage door safety switch, where pressure is used instead of light. When the door "hits" an object, and the door cannot proceed downwards, it throws a switch that automatically retracts the garage door.
These sensors have failed often, and people have not only been hurt, they've been KILLED. The door closed upon them, and then the elevator proceeded to the next floor with the person stuck IN the door.
EDIT:: There are photo eyes in the newer elevators. You can actually step across the entrance to the door without stepping ON it, and the light beam breaks and re-opens the door.
It is the OLD technology that used pressure sensitive pads, and yes, they were prone to failure as well, as you could step across the entrance as in the example above, and the doors would NOT re-open.
The light sensitive ones have replaced that technology, and it will only be a matter of time before the old technology cycles itself through the system...