I believe it's a remnant from the past, before ambient light sensors and auto-brightness became commonplace. People thought #000000 on #FFFFFF put too much strain on the eyes. Fortunately, it looks like web designers are moving away from that—a good, unapologetic example is Bloomberg's website:
https://www.bloomberg.com/.