it's for contrast, white text on light background is almost impossible to read same with dark on dark. Uses a per character or per pixel filter to determine the color of the text
Plus it’s probably more complex to engineer multi-colour (well, two colour) font rendering onto the video. Getting the background brightness for each character is as simple as adding all the pixel rgb values together and threshold in. It doesn’t need to be very accurate.