As an adult, I have never been asked about this by any doctor. Nor, not surprisingly, was I ever asked about it as a prepubescent child. Nor was I asked about it as a teen- with one exception.
When I was 16, I was examined by a school doctor who went way over the limit in terms of what was acceptable, proper during a routine school medical. Before this exam, I had 8 prebious school medicals - and, afterwards, a further school medical and then a pre - university medical. Yes...I wound up naked in all of those exams, but the first part was always conducted in my underwear. Yes, my genitals and anus were inspected. It was embarrassing, but I have always thought that it was done properly and objectively.
This particular doctor insisted that I strip totally naked from the outset. Furthermore, he most definitely watched me undressing. It made me feel uneasy. He did the routine things common to most exams. But...he did a lot of non routine things. For example, getting me to walk around in certain ways..to do bends, flexes and stretches. To do PT exercises like Star Jumps, sit ups, push ups etc....watching me intensely the whole time.
Finally, he spent an extremely long time examining my genitals and anal area. Parting my butt cheeks etc. Fondling my balls and stroking my penis ( retracting the foreskin several times ). He asked lots of very personal and embarrassing questions of a sexual nature. Yes, he certainly asked about masturbation, 'wet dreams' and whether or not I had had sexual intercourse with a girl yet. I told him I was still a virgin. It was all horribly embarrassing and quite upsetting. Of course, I did not ever dare tell anyone about it. Just 'buried' the experience for well over 40 years or so.