Why do the doors no longer open?

Just before a vehicle is about to pull away from a stop at an intersection with traffic lights, someone runs up to the stop. The bus or tram is still motionless, but the doors will not open. Why is that?

Buses and trams signal their presence when at an intersection with traffic lights. This occurs after all passengers have checked in or out.

The vehicle then drives a short distance towards the traffic lights. This activates a sensor that controls the traffic lights. This gives the bus or tram priority over other traffic. As soon as the light turns green, the driver has to drive away. If the driver opens the doors again, it will delay the other traffic and the vehicle as well.