This is one of the classic arguments that there is chance in chess. People who don't play chess don't understand how much opening preparation can matter in affecting the outcome.
Theoretically, it is all taken into account when the rating system puts the probabilities to the various outcomes once the match starts. A 1500 sits down across from a 1700 -- there is some chance that the 1500 will win, some chance of a draw, and some chance that the 1700 player wins.
Sometimes we get matched with players rated below us and sometimes rated above us, Sometimes we lose and other times we win.
For example
Playing against a much higher rated opponent you find yourself in a familiar opening variation and understand the middlegame adequately allowing you a possible win. It works, you beat the guy rated 2100+ yet your only 1800. (The perfect opponent!)
The next game, you are matched against a 1600 player. He plays that opening you hate and you cant seem to handle it at all. You are either freaked out by it and puts you off for the whole game or you simply play a bad game and lose.
Has this ever happend you? Maybe your the 1900 player who beats 2100`s but loses to 1700`s, or are you the 1300 player who beats 1500`s yet loses to 1100`s? Surely most people experience this at some stage?
P.s. i am not implying wins/loses against either lower/higher rated players all the time but the odd one or two players now and then. Eliminating the possibility of a 'fluke' rating or under/over-rated players.