YouTube keeps a log of your prior viewing habits and recommends other videos based on this data.