He probably wouldn’t react in the same way if he were discussing a topic that touched on physics, and his interlocutor said, “As a physicist …” In that case, she has expertise that he is likely to recognize as conversationally relevant. Even if he knew she was a physicist before the conversation began, he might find it reasonable for her to preface some of her assertions with a reminder that she is speaking from a position of special knowledge.
Being a physicist gives a person a certain standing in conversations that have something to do with physics. So why shouldn’t being a woman give me a certain standing in conversations that have something to do with gender?
Dress for respect (Brazília)