I don't think they do. I wouldn't leave, and I know plenty of people who stayed/stay beside me, even though I've been depressed for years (plus other mental health issues).
However, I think they might take some distance at times to protect themselves, their own mental health, if some of the depression "symptoms" start affecting them too much. For example, if the depressed person becomes overly dependent on them, or if they're being extremely negative all the time.
We shouldn't expect them to have the mental health and empathy of a rock. Everyone has a life, everyone has some struggles (even if they're not mental health problems, or if they seem less awful than depression), so I think both parties should be compassionate with each other and make efforts to make it work.
But most people don't leave if you just tell them you have depression.