In addition to the other answers, which explain how Netflix looks at your rankings and viewing habits, they also give preference based on what it costs them to let you watch a program. I don't have the source handy, but I read this somewhere, and it makes sense. They want to encourage you to watch the less costly content, to keep their costs down.