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
Though, they’re not exactly “permanent.” Depending on the encoding, they’re potentially pretty easy to remove. (If it’s encoded to meta data. It’s just a playback thing. You can turn this on for VHS movies, too,)
It’s done to have a big contrast between the letter and its background, so you can read all the information all the time (except in edge cases, like the seconds in the video you show, the background is mostly 50-50 with black and white, so the text is kept in black, and can be a bit hard to read)