I agree, it is
standard protocol to have an opposite sex assistant in the room for patients of ANY age. It is also a liability issue, to protect the doctor as well from false allegations.
The doctor was passive-aggressively shaming and critical of the OP.

She has a right to be there for her child.
Yes, and this is
first contact with a new doctor who the children are being told to trust. The Dr. could be creating a little list of his own, checking to see how the children respond to him: who is docile, quiet, compliant, has very few boundaries, will allow accidental, close to innapropriate touch without speaking up.
Then later, he shadows the the ones he targets after school. Or they start seeing him at ball games. They recognize him as the school doctor they were told was okay. "Hey Jane, I didn't want to mention it during the exam as there was so many kids in line, but I want to talk to you about a heart murmur I heard. . . that mole I noticed down your spine, etc. . . we should keep an eye on it. Come to my office after school. . . but, don't tell your mom, we don't want to needlessly worry her,
until we know more."
The child/teen, already the compliant type to authorities does what he says, including not tell the parents. So, he "watches" the mole or listens to the heart, for months without incident, until he's sure he's got the child's trust built up.
Okay, this is WAAAY too much of the "what if". This is the kind of thinking that can only make you crazy. It doesn't do anyone any good. While I support a parent's right to accompany a teenager into a doctor's office, if the teen wants them there, I can not support this kind of fear-mongering. Especially if you let it control your decisions!
For instance, what if the man you married just wanted to breed kids with you so he could molest them? That's as likely a scenario as the one you're worried about. Heck, it's MORE likely. But I bet you don't give your husband the hairy eyeball and refuse to leave your teenage daughter alone with him, do you?
Frankly, when it comes right down to it, the only protection your teenage daughter has is herself. Have you told her never to leave her drink alone? Have you taught her to always speak up if someone is touching her in a way that makes her even the slightest bit uncomfortable? Do you make her pay attention to the news, and talk to her about the stories of rape and molestation? Do you talk to her about sex and relationships regularly?
I was raised to be compliant and totally ignorant about sex. A "good" girl. I was molested, and went to court and the case was dropped because I hit puberty and the D.A. said no one with breasts could be a convincing witness (it was the eighties). So, I've raised my own children be NON-compliant with authority. I've had teachers tell me that my son is polite, but that he doesn't seem to understand that he's not their equal. I don't think that's a problem, frankly. I think it's great!
Kids have to have power, and parents have to have trust. It does kids no good to have their parents hovering over them in a state of constant fear. They have to have the tools to protect themselves. They have to be able to spot danger and make smart decisions.
My 14 daughter goes to a chiropractor. Do I accompany her to every weekly session? No. Is she alone with him in the room? Yes. Have I talked to her about the fact that this man sometimes has his hands on her rear end, when he's adjusting her lower back? You bet! I also keep an eye out for signs of infatuation on her part (which would be the first warning sign that boundaries are being crossed). But as she says (eyes rolling), "Mom! It's totally professional. Jeez, I know the difference."
I'm okay with this, because I know she's okay with this. And because I know perfectly well what the worst case scenario can be, and I've done what I can to arm her against it (and my son, too!).
There are appropriate times to be afraid. This is not one of them.