Question: do cats know you're sad?
Answer: Cats may not be emotionally intelligent enough to realize that you need comfort when you're sad, but they are receptive to the concept that you're paying them attention. If your cat associates your sadness with love and attention, it's going to seek you out at your low points.