The driver being overtaken often has a clear view of the end of the other combination. As soon as the entire semi-trailer has passed, he can briefly signal with his headlights. This indicates that there is sufficient room to move back to the right. Such a signal is therefore usually intended in a friendly manner. The truck driver is not trying to rush his colleague; he is simply helping him to better estimate the length of his vehicle.
Motorists can also get such a flash.
The signal is primarily used between truck drivers. However, you may also encounter it as a car driver. This happens, for example, when you are traveling with a caravan or trailer. With just a passenger car, you can usually clearly see when you have passed a truck. With a caravan behind the car, that is much more difficult. Your vehicle combination is suddenly several meters longer.