This ability is found within the universal access panel of the system preferences. It is speculated that it's use is to make text easier to read which, in my opinion it does, for people who have slightly impaired vision. If you were, for example, reading a long piece of text, such as an article, the white on grey would be easier on your eyes than the black on white.