It was at my doctors office and he said it was to check my development. I was so embarrassed by his request but being that I was so young (I was 12) and naive; I did as I was told.
If you were a boy it might, just very very remotely, might be almost believable in that boys exhibit quite clear cut reactions to masturbation: an erection and ejaculation.
How would anyone assess a girl's ability to masturbate properly? I suppose secretions might be noted and other than that outwardly, the anal sphincter rhythmically pulses in and out and the toes clench together. Now, how would a doctor check on a pulsating anus? I mean c'mon, seriously. And on a 12 year old?
Then again, on reflection, I don't think any doctor could come up with a proper justification, except out of own sexual interest/gratification.