I don’t feel we have enough information to make any kind of judgment here. Did your friend specify what kind of doctor asked him if he owned a gun? Maybe it was his psychiatrist and he has suicidal issues they’re trying to work out? In that case it’s a legit question and the doctor probably just wanted to ensure that if he did have guns in the home they were not overly easy and impulsively accessible. Storing guns in a gun cabinet under lock and key could be just enough deterant to assuage a dark impulse. Thumbs up to the doctor for his good counsel. Doctors have probably saved more than a few lives by following such a sensible and caring line of inquiry.
What? There was no indication of any counsel given on this beyond the premise of a Dr. asking a patient if guns were in the home.
I can see scenarios where asking about firearms might be reasonable or pertinent to the medical case. But this was just a general premise.