kTurn is multiplied by the heading error (difference between current heading and desired heading of the trajectory segment) and added/subtracted to the left and right outputs, respectively. This helps the robot stay facing the right heading while it follows the trajectory. Another way to think about it is the P constant of a PID controller for the heading with I=0, D=0.
This the code that implements this behavior.