It may be beneficial for some, but not everyone. Also a large part of therapy is having an isolated environment where you can openly talk about anything that you wouldn't ever share with anyone else. A group of friends is often not that environment.
> Or is it just the safe thing to say without sticking one's neck out?
If you want to stick your neck out in that situation you could offer making a therapist appointment for that person. It lowers the barrier to getting help a lot and imho feels more understanding and supportive than trying to cheer them up or whatever else one might come up with. YMMV of course.
I'd wager many depressed people would benefit from interacting with people who are not their psychiatrist.