Question: are taxi drivers allowed to lock the doors?
Answer: As to the question part, yes, they are allowed to lock the doors. In fact many modern vehicles will lock the doors automatically when the vehicle is placed in gear. The driver may keep the door locked while accepting payment, but that is usually mere oversight.