Well, in Japan many (but not all) stations have a departure melody which is sounded before the door closes. The guard made a mistaken assumption that there were no passengers that still hadn't boarded. I don't know the layout of this particular station, but it was a long 12 car train, so his/her view down platform may have been blocked by some obstruction or curve of the track. As Japanese urban train services are timed often to 5 second intervals (the working timetable timepoints for a particular single train service, not the service frequency), it is entirely conceivable that regular commuters have their own schedule close to those margins (however unwise). The fact that this was an outer suburban service also adds to the frustration the commuters left behind may have felt, as the next train may have them getting to their destination(perhaps 30 or 40km away) late.