That is to say a flash photograph actually consists of two separate exposures; one for ambient light and the other for flash - the camera shutter determines outcome of the ambient exposure and the flash lights up the subject.you understanding of front and rear sync flash is incorrect, flash is able to freeze action, since the duration of flash much faster than most camera shutter speed. and flash does not increase camera shutter speed.
anyway, for the situation here, the flash is use to illuminate the subject, the long exposure is to record the background.