In the case of a suspected cold, it’s perfectly reasonable to keep one’s distance to try to avoid catching it, whether the supposition is correct or not.
Suspected depression? Harder to say, but at minimum I hope that appraisal engenders understanding and compassion. I think gently suggesting someone seek professional help is reasonable. I also think we have a tendency to overly pathologize perfectly normal mental states, however, and especially if (as the OP states) a person appraises themselves to be OK, then suggestion should not become insistence.
That reason is partly so that they can be recognized as doctors. Making an observational deduction has nothing to do with medicine nor imitating a doctor, per se.
This is not support for your previous sentence. A large portion of doctors' training consists of making sure they will treat someone with a runny nose for a cold before they'll even consider other explanations.