All jobs rely on attention. In this example, a security guard having to divert attention to interact with guests at the elevator is going to be distracted far more.
The question is what is the impact of lack of attention, it is hard to keep attention when the job is boring and if 5 minutes of lack of attention are critical than it might be a good idea to make the job less boring by gamifying it. Taking an action even simple as pressing a button makes people more alert, that's why Japanese train drivers for example must do some hand movement of sometimes say some word when they see a signal, apparently it keeps them more aware. I am not saying keeping those people pressing buttons in the lift was for security reasons but it could be a desired outcome which was later observed as useful and therefore the position was kept as is.