Since many more people killed by vehicles every year than by guns, it stands to reason that doctors would be better advised to ask about vehicles ownership and if everyone is properly trained in vehicle saftey.
I’ve never had a pediatrician ask me about guns.
But in fairness I have had them ask me about car safety. Specifically child car seats, location in the vehicle, whether they were installed by me or the police/fire dept.