My understanding is obamacare requires certain questions, and feeling safe at home is one of them. I was quite annoyed by my doc’s nurse asking this question so I asked, and she said it was an obamacare requirement.
I recently got a physical at a veterans hospital, they asked the same line of questions, then went into a PTSD series. I asked the VA nurse about the PTSD questions, and that was supposedly standard with the VA.
There is a morass of bureaucratic interpretation of ambiguous policies with no basis in actual laws. What is "required by law" will depend on who you ask. For the most part these are local progressive fashions which are justified by a claim of a higher authority that demands them.
Any official questions regarding mental health or state of mind should be answered carefully or not at all. It is definitely not a good time to indulge oneself in a reply with a sarcastic or ironic statement or an attempt at comedy.
In this forum, (Free Republic), it is still safe to do that. Not so much at a doctor's office.