It’s more than just opening and closing doors. They’re also checking the platforms to ensure it’s safe to depart (no obstructions or people stuck between the train and the platform) and doing other things like applying ramps for wheelchair users. And in the event of an emergency they might be the ones to keep you alive and lead you to safety.